Class: CML::Tags::Ratings
Constant Summary collapse
- Template =
<<-HTML.freeze {{label}} <table> <thead> <tr> <th></th> {% for rating in ratings limit:10 %} <th>{{forloop.index}}</th> {% endfor %} <th></th> </tr> </thead> <tbody> <tr> <td>{{from}}</td> {% for rating in ratings limit:10 %} <td>{{rating}}</td> {% endfor %} <td>{{to}}</td> </tr> </tbody> </table> HTML
Instance Attribute Summary
Attributes inherited from CML::Tag
Instance Method Summary collapse
Methods inherited from CML::Tag
#children, #classes, #convert, #gold=, #gold?, #initialize, #instructions, #label, #legend, #name, #prefix, #raw_label, #to_html, #to_liquid, #to_s, #validate?, #validations, #value, #wrapper, #wrapper_classes
Constructor Details
This class inherits a constructor from CML::Tag
Instance Method Details
#data ⇒ Object
28 29 30 |
# File 'lib/cml/tags/ratings.rb', line 28 def data super.merge({"ratings" => , "from" => @attrs["from"].to_s, "to" => @attrs["to"].to_s}) end |