Module: DomFor
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/dom_for.rb,
lib/dom_for/model.rb,
lib/dom_for/record.rb,
lib/dom_for/version.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'1.0.2'
Instance Method Summary collapse
-
#dom_for(object, attrs = {}, &block) ⇒ String
Creates a div tag with the attributes for the model or record of ActiveRecord.
Methods included from Record
Methods included from Model
Instance Method Details
#dom_for(object, attrs = {}, &block) ⇒ String
Creates a div tag with the attributes for the model or record of ActiveRecord
33 34 35 36 37 38 39 |
# File 'lib/dom_for.rb', line 33 def dom_for(object, attrs={}, &block) if object.instance_of? Class dom_for_model(object, attrs, &block) else dom_for_record(object, attrs, &block) end end |