diff options
Diffstat (limited to 'actionpack/lib')
5 files changed, 10 insertions, 24 deletions
diff --git a/actionpack/lib/action_controller/metal/instrumentation.rb b/actionpack/lib/action_controller/metal/instrumentation.rb index 7f9a7c068b..85035dc09c 100644 --- a/actionpack/lib/action_controller/metal/instrumentation.rb +++ b/actionpack/lib/action_controller/metal/instrumentation.rb @@ -18,7 +18,9 @@ module ActionController :controller => self.class.name, :action => self.action_name, :params => request.filtered_parameters, - :formats => request.formats.map(&:to_sym) + :formats => request.formats.map(&:to_sym), + :method => request.method, + :path => (request.request_uri rescue "unknown") } ActiveSupport::Notifications.instrument("action_controller.start_processing", raw_payload.dup) diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 5199984814..8de68b3174 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -207,8 +207,7 @@ module ActionDispatch lambda do |env| req = Request.new(env) - - uri = URI.parse(path_proc.call(req.params.symbolize_keys)) + uri = URI.parse(path_proc.call(req.symbolized_path_parameters)) uri.scheme ||= req.scheme uri.host ||= req.host uri.port ||= req.port unless req.port == 80 diff --git a/actionpack/lib/action_pack/version.rb b/actionpack/lib/action_pack/version.rb index ed0cdf38ee..4dde21dd40 100644 --- a/actionpack/lib/action_pack/version.rb +++ b/actionpack/lib/action_pack/version.rb @@ -2,7 +2,7 @@ module ActionPack #:nodoc: module VERSION #:nodoc: MAJOR = 3 MINOR = 0 - TINY = "pre" + TINY = "0.beta" STRING = [MAJOR, MINOR, TINY].join('.') end diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 1d91b6957a..4d29a03b92 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -528,7 +528,7 @@ module ActionView object_name = ActionController::RecordIdentifier.singular_class_name(object) end - builder = options[:builder] || ActionView.default_form_builder + builder = options[:builder] || ActionView::Base.default_form_builder yield builder.new(object_name, object, self, options, block) end @@ -1208,21 +1208,8 @@ module ActionView end end - class << ActionView - attr_accessor :default_form_builder + class Base + cattr_accessor :default_form_builder + @@default_form_builder = ::ActionView::Helpers::FormBuilder end - - self.default_form_builder = ::ActionView::Helpers::FormBuilder - - # 2.3 compatibility - class << Base - def default_form_builder=(builder) - ActionView.default_form_builder = builder - end - - def default_form_builder - ActionView.default_form_builder - end - end - end diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index 9b8471c6c6..ba1b0bcc20 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -329,9 +329,7 @@ module ActionView # radio_button_tag 'color', "green", true, :class => "color_input" # # => <input checked="checked" class="color_input" id="color_green" name="color" type="radio" value="green" /> def radio_button_tag(name, value, checked = false, options = {}) - pretty_tag_value = value.to_s.gsub(/\s/, "_").gsub(/(?!-)\W/, "").downcase - pretty_name = name.to_s.gsub(/\[/, "_").gsub(/\]/, "") - html_options = { "type" => "radio", "name" => name, "id" => "#{pretty_name}_#{pretty_tag_value}", "value" => value }.update(options.stringify_keys) + html_options = { "type" => "radio", "name" => name, "id" => "#{sanitize_to_id(name)}_#{sanitize_to_id(value)}", "value" => value }.update(options.stringify_keys) html_options["checked"] = "checked" if checked tag :input, html_options end |