Commit 2c7f9e18 authored by Michael Vernier's avatar Michael Vernier

Added vote method to model

parent 57c0f5bf
class Poll < ActiveRecord::Base
unloadable
def vote( answer )
increment( answer == 'yes' ? :yes : :no )
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment