module RailsCoreExtensions::HasManyExtensions::Tags
Public Instance Methods
hm_check_box(object_name, method, options = {})
click to toggle source
# File lib/rails_core_extensions/action_view_has_many_extensions.rb, line 4 def hm_check_box(object_name, method, options = {}) object = options.delete(:object) parent = options.delete(:parent) || instance_variable_get(object_name) objects = options.delete(:objects) || parent.send(method) check_box_tag("#{object_name}[#{method}][]", object, objects.include?(object), options.merge(:id => "#{object_name}_#{method}")) end
hm_empty_array(object_name, method)
click to toggle source
# File lib/rails_core_extensions/action_view_has_many_extensions.rb, line 11 def hm_empty_array(object_name, method) hidden_field_tag "#{object_name}[#{method}][]" end