Permalink
Browse files

Move collection_check_boxes and collection_radio_buttons to they our

module

[Carlos Antonio da Silva + Rafael Mendonça França]
  • Loading branch information...
1 parent 7af0ec7 commit 5c497262f3d0a1d3f754506894efca051162846d @rafaelfranca rafaelfranca committed with carlosantoniodasilva Jan 31, 2012
@@ -12,6 +12,7 @@ module Helpers #:nodoc:
autoload :CsrfHelper
autoload :DateHelper
autoload :DebugHelper
+ autoload :FormCollectionsHelper
autoload :FormHelper
autoload :FormOptionsHelper
autoload :FormTagHelper
@@ -42,6 +43,7 @@ module Helpers #:nodoc:
include CsrfHelper
include DateHelper
include DebugHelper
+ include FormCollectionsHelper
include FormHelper
include FormOptionsHelper
include FormTagHelper
@@ -0,0 +1,13 @@
+module ActionView
+ module Helpers
+ module FormCollectionsHelper
+ def collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
+ Tags::CollectionRadioButtons.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block)
+ end
+
+ def collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
+ Tags::CollectionCheckBoxes.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block)
+ end
+ end
+ end
+end
@@ -191,14 +191,6 @@ def collection_select(object, method, collection, value_method, text_method, opt
Tags::CollectionSelect.new(object, method, self, collection, value_method, text_method, options, html_options).render
end
- def collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
- Tags::CollectionRadioButtons.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block)
- end
-
- def collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
- Tags::CollectionCheckBoxes.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block)
- end
-
# Returns <tt><select></tt>, <tt><optgroup></tt> and <tt><option></tt> tags for the collection of existing return values of
# +method+ for +object+'s class. The value returned from calling +method+ on the instance +object+ will
# be selected. If calling +method+ returns +nil+, no selection is made without including <tt>:prompt</tt>

0 comments on commit 5c49726

Please sign in to comment.