Class: Clot::ClotTag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Clot::ClotTag
- Includes:
- AttributeSetter, TagHelper
- Defined in:
- lib/clot/no_model_form_tags.rb
Direct Known Subclasses
CheckBox, CheckBoxTag, CollectionSelect, InputTag, LabelTag, MultiDateTag, NumberedTag, SelectTag, SubmitTag, TextAreaTag
Instance Method Summary collapse
-
#initialize(name, params, tokens) ⇒ ClotTag
constructor
A new instance of ClotTag.
- #render(context) ⇒ Object
Methods included from TagHelper
Methods included from AttributeSetter
#personal_attributes, #set_attributes, #set_primary_attributes
Constructor Details
#initialize(name, params, tokens) ⇒ ClotTag
Returns a new instance of ClotTag.
51 52 53 54 |
# File 'lib/clot/no_model_form_tags.rb', line 51 def initialize(name, params, tokens) @_params = split_params(params) super end |
Instance Method Details
#render(context) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/clot/no_model_form_tags.rb', line 56 def render(context) instance_variables.map(&:to_sym).each do |var| unless [:@_params, :@markup, :@tag_name].include? var instance_variable_set var, nil #this is because the same parse tag is re-rendered end end @params = @_params.clone set_attributes(context) render_string end |