Review my votes page
This commit is contained in:
@@ -16,7 +16,7 @@ module Budgets
|
||||
load_investment
|
||||
load_heading
|
||||
|
||||
if @line.save
|
||||
if @ballot.add_investment(@investment)
|
||||
#@ballot.set_geozone(@geozone)
|
||||
#@current_user.update(representative_id: nil)
|
||||
if request.get?
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
module Budgets
|
||||
class BallotsController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
load_and_authorize_resource :budget
|
||||
before_action :load_ballot
|
||||
load_and_authorize_resource
|
||||
|
||||
def show
|
||||
render template: "budgets/ballot/show"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def load_ballot
|
||||
@ballot = Ballot.where(user: current_user).first_or_create
|
||||
@ballot = Budget::Ballot.where(user: current_user, budget: @budget).first_or_create
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user