Sha256: f8e659c5622e393fd2b4caf11c992eaeeaf61496d6994fcf79a0072600905024
Contents?: true
Size: 363 Bytes
Versions: 6
Compression:
Stored size: 363 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
6 entries across 6 versions & 1 rubygems