Module: Neutral::Helpers::ActionViewExtension
- Defined in:
- lib/neutral/helpers/action_view_extension.rb
Instance Method Summary collapse
Instance Method Details
#voting_for(*args) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/neutral/helpers/action_view_extension.rb', line 4 def voting_for(*args) voteable = args.shift = args..merge(voter: current_voter) not_voteable(voteable) unless voteable.is_a?(Neutral::Model::ActiveRecordExtension::Voteable) Neutral::VotingBuilder::Builder.new(voteable, ).build end |