Sha256: d8b1fcc4789fc44e202f260d417cddf530eb9f2e1996ee1b33d9da0b4be5c204
Contents?: true
Size: 573 Bytes
Versions: 23
Compression:
Stored size: 573 Bytes
Contents
- ids_method = field.name.to_s.match(/_ids$/) ? field.name : "#{field.name.to_s.singularize}_ids" = hidden_field_tag "#{resource_name}[#{ids_method}][]","" - field.view_values(self).each do |value| - editors = resource.send(:"#{ids_method}") .habtm-container = label_tag "#{resource_name}_#{field.name}_#{value.last}",value.first, :class => "habtm-label" = check_box_tag "#{resource_name}[#{ids_method}][]", value.last, resource.send("#{ids_method}").include?(value.last), :id => "#{resource_name}_#{field.name}_#{value.last}", :class => "habtm-checkbox" .clear
Version data entries
23 entries across 23 versions & 1 rubygems