Sha256: 5cbfd26ace5498b1259fdfd143591f1e118cab4624c0e7d3c2cd48f2fcb74f26

Contents?: true

Size: 392 Bytes

Versions: 2

Compression:

Stored size: 392 Bytes

Contents

require_dependency "rails_voter/application_controller"

module RailsVoter
  class VotingResultsController < ApplicationController
    expose :voting_result, model: RailsVoter::VotingResult

    def create
      voting_result.save
      render layout: false
    end

    private

    def voting_result_params
      params.require(:voting_result).permit(:election_detail_id)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_voter-0.2.1 app/controllers/rails_voter/voting_results_controller.rb
rails_voter-0.2.0 app/controllers/rails_voter/voting_results_controller.rb