Module: BehaviorHelper
- Defined in:
- app/helpers/behavior_helper.rb
Instance Method Summary collapse
Instance Method Details
#behavior_tag(conf) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/helpers/behavior_helper.rb', line 3 def behavior_tag(conf) case config.[conf][:type] when 'text' text_area_tag("conf[#{conf}]", config[conf], :id => conf) when 'password' password_field_tag("conf[#{conf}]", config[conf], :id => conf) when 'select' select_tag("conf[#{conf}]", (config.[conf][:options]), :id => conf) else text_field_tag("conf[#{conf}]", config[conf], :id => conf) end end |