Class: Formol::PollVotesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Formol::PollVotesController
- Includes:
- Controllers::Nested::HasParentTopic
- Defined in:
- app/controllers/formol/poll_votes_controller.rb
Instance Method Summary collapse
Methods included from Controllers::Nested::HasParentTopic
Methods inherited from ApplicationController
#last_page_forum_topic_path, #paginated_forum_topic_post_path, #per_page, #topic_last_page_number, #topic_post_page_number
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/formol/poll_votes_controller.rb', line 5 def create (current_formol_user, :vote_poll, topic) poll.vote(current_formol_user, params['poll']['poll_vote_ids']) rescue Formol::Poll::PollException => e flash[:error] = t(e.) ensure respond_to do |format| format.html { redirect_to [topic.forum, topic] } end end |