Module: Zena::Use::NestedAttributesAlias::ViewMethods
- Defined in:
- lib/zena/use/nested_attributes_alias.rb
Overview
Lets you use nested_attributes_alias methods in forms: <%= text_field ‘title’ %>
Defined Under Namespace
Classes: InstanceTag
Instance Method Summary collapse
- #check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object
- #file_field(object_name, method, options = {}) ⇒ Object
- #hidden_field(object_name, method, options = {}) ⇒ Object
- #password_field(object_name, method, options = {}) ⇒ Object
- #radio_button(object_name, method, tag_value, options = {}) ⇒ Object
- #text_area(object_name, method, options = {}) ⇒ Object
- #text_field(object_name, method, options = {}) ⇒ Object
Instance Method Details
#check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object
53 54 55 |
# File 'lib/zena/use/nested_attributes_alias.rb', line 53 def check_box(object_name, method, = {}, checked_value = "1", unchecked_value = "0") ViewMethods::InstanceTag.new(object_name, method, self, .delete(:object)).to_check_box_tag(, checked_value, unchecked_value) end |
#file_field(object_name, method, options = {}) ⇒ Object
45 46 47 |
# File 'lib/zena/use/nested_attributes_alias.rb', line 45 def file_field(object_name, method, = {}) ViewMethods::InstanceTag.new(object_name, method, self, .delete(:object)).to_input_field_tag("file", ) end |
#hidden_field(object_name, method, options = {}) ⇒ Object
41 42 43 |
# File 'lib/zena/use/nested_attributes_alias.rb', line 41 def hidden_field(object_name, method, = {}) ViewMethods::InstanceTag.new(object_name, method, self, .delete(:object)).to_input_field_tag("hidden", ) end |
#password_field(object_name, method, options = {}) ⇒ Object
37 38 39 |
# File 'lib/zena/use/nested_attributes_alias.rb', line 37 def password_field(object_name, method, = {}) ViewMethods::InstanceTag.new(object_name, method, self, .delete(:object)).to_input_field_tag("password", ) end |
#radio_button(object_name, method, tag_value, options = {}) ⇒ Object
57 58 59 |
# File 'lib/zena/use/nested_attributes_alias.rb', line 57 def (object_name, method, tag_value, = {}) ViewMethods::InstanceTag.new(object_name, method, self, .delete(:object)).(tag_value, ) end |
#text_area(object_name, method, options = {}) ⇒ Object
49 50 51 |
# File 'lib/zena/use/nested_attributes_alias.rb', line 49 def text_area(object_name, method, = {}) ViewMethods::InstanceTag.new(object_name, method, self, .delete(:object)).to_text_area_tag() end |
#text_field(object_name, method, options = {}) ⇒ Object
33 34 35 |
# File 'lib/zena/use/nested_attributes_alias.rb', line 33 def text_field(object_name, method, = {}) ViewMethods::InstanceTag.new(object_name, method, self, .delete(:object)).to_input_field_tag("text", ) end |