From e01091d1964419403a71da50ca099f752fc63156 Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Thu, 30 Aug 2012 21:52:22 +0300 Subject: Added example of using options_for_select() with select_tag() --- actionpack/lib/action_view/helpers/form_tag_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index ace457df2e..f16e33d08d 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -117,6 +117,10 @@ module ActionView # select_tag "destination", "".html_safe, :disabled => true # # => + # + # select_tag "credit_card", options_for_select([ "VISA", "MasterCard" ], "MasterCard") + # # => def select_tag(name, option_tags = nil, options = {}) option_tags ||= "" html_name = (options[:multiple] == true && !name.to_s.ends_with?("[]")) ? "#{name}[]" : name -- cgit v1.2.3 From 30123653993cd3ef6eda9a4299f287e945d963f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20Kr=C3=A4uter?= Date: Fri, 31 Aug 2012 17:08:07 +0300 Subject: there is no "delete" action in a controller --- actionpack/lib/action_view/helpers/url_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index fe3240fdc1..c4f79c669e 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -338,7 +338,7 @@ module ActionView # # " # # - # <%= button_to "Delete Image", { :action => "delete", :id => @image.id }, + # <%= button_to "Delete Image", { :action => "destroy", :id => @image.id }, # :method => :delete, :data => { :confirm => "Are you sure?" } %> # # => "
# #
-- cgit v1.2.3 From a1c7b0ecfc30b0c644d49b3c55747838d734b97c Mon Sep 17 00:00:00 2001 From: Sven Kraeuter | 5v3n Date: Sat, 1 Sep 2012 01:37:47 +0200 Subject: reverting changes from commit b0896c38 --- actionpack/lib/action_view/helpers/url_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index c4f79c669e..fe3240fdc1 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -338,7 +338,7 @@ module ActionView # # " # # - # <%= button_to "Delete Image", { :action => "destroy", :id => @image.id }, + # <%= button_to "Delete Image", { :action => "delete", :id => @image.id }, # :method => :delete, :data => { :confirm => "Are you sure?" } %> # # => "
# #
-- cgit v1.2.3