Fix "go back" link in ballot page
Since the `@ballot_referer` variable was only set in the lines controller, it didn't work when we accessed the ballot page without adding a line. Note it still doesn't work if we access the ballot page directly by entering the URL in the browser's address bar.
This commit is contained in:
@@ -7,7 +7,6 @@ module Budgets
|
||||
before_action :load_tag_cloud
|
||||
before_action :load_categories
|
||||
before_action :load_investments
|
||||
before_action :load_ballot_referer
|
||||
|
||||
authorize_resource :budget
|
||||
authorize_resource :ballot
|
||||
@@ -67,10 +66,6 @@ module Budgets
|
||||
@categories = Tag.category.order(:name)
|
||||
end
|
||||
|
||||
def load_ballot_referer
|
||||
@ballot_referer = session[:ballot_referer]
|
||||
end
|
||||
|
||||
def load_map
|
||||
@investments ||= []
|
||||
@investments_map_coordinates = MapLocation.where(investment: @investments).map(&:json_data)
|
||||
|
||||
Reference in New Issue
Block a user