Sha256: 7f058c2cea74d45b60c69656825e42ba071da63bc4c77b2feaf6f6a00ddf6643
Contents?: true
Size: 362 Bytes
Versions: 4
Compression:
Stored size: 362 Bytes
Contents
module Neutral module VotesHelper def by_url return raw "a[href*='#{request.post? ? votes_path : vote_path}']" end def vote_path(value=[1,0].sample) raw neutral.vote_path(vote, value: value) end def votes_path(value=[1,0].sample) raw neutral.votes_path(vote: vote.main_attributes.update(value: value)) end end end
Version data entries
4 entries across 4 versions & 1 rubygems