Module: ActsAsCaesar::Rails::ViewHelpers
- Defined in:
- lib/acts_as_caesar/rails/view_helpers.rb
Instance Method Summary collapse
Instance Method Details
#acts_as_caesar(options = {}) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/acts_as_caesar/rails/view_helpers.rb', line 7 def acts_as_caesar( = {}) content_tag(:div, [:content] || '', ([:html] || {}).merge({ "data-candidate" => Candidate.new([:candidate]).key, "data-voter" => Voter.new([:voter]).key, "data-acts-as-caesar" => 'uninit', "data-base-path" => [:base_path] }.delete_if { |k,v| v.blank? })) end |