Skip to content

Commit

Permalink
Merge branch 'feature/AGEND-56'
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmorenoh committed Apr 22, 2020
2 parents 4d4a44e + 4956173 commit c8686df
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
13 changes: 8 additions & 5 deletions app/controllers/admin/hidden_proposals_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def confirm_hide
if params[:tipo] == 'legislation_proposal'
@proposals_legislation.confirm_hide
else
@proposal.confirm_hide
@proposals.confirm_hide
end
redirect_to admin_hidden_proposals_path(params_strong)
end
Expand All @@ -34,8 +34,8 @@ def restore
@proposals_legislation.restore
@proposals_legislation.ignore_flag
else
@proposal.restore
@proposal.ignore_flag
@proposals.restore
@proposals.ignore_flag
end
Activity.log(current_user, :restore, @datos_comunes)
redirect_to admin_hidden_proposals_path(params_strong)
Expand All @@ -48,8 +48,11 @@ def params_strong
end

def load_proposal
@proposals_legislation = Legislation::Proposal.with_hidden.find(params[:id])
@proposals = Proposal.with_hidden.find(params[:id])
if params[:tipo] == 'legislation_proposal'
@proposals_legislation = Legislation::Proposal.with_hidden.find(params[:id])
else
@proposals = Proposal.with_hidden.find(params[:id])
end
end

def load_resources
Expand Down
2 changes: 1 addition & 1 deletion app/models/budget/investment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def self.search_by_title_or_id(title_or_id, results)

def searchable_values
{ title => "A",
author.username => "B",
author.try(:username) => "B",
heading.try(:name) => "B",
tag_list.join(" ") => "B",
description => "C"
Expand Down
2 changes: 1 addition & 1 deletion app/models/debate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def self.recommendations(user)

def searchable_values
{ title => "A",
author.username => "B",
author.try(:username) => "B",
tag_list.join(" ") => "B",
geozone.try(:name) => "B",
description => "D"
Expand Down
2 changes: 1 addition & 1 deletion app/models/legislation/proposal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def to_param

def searchable_values
{ title => "A",
author.username => "B",
author.try(:username) => "B",
tag_list.join(" ") => "B",
geozone.try(:name) => "B",
summary => "C",
Expand Down
2 changes: 1 addition & 1 deletion app/models/proposal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def to_param

def searchable_values
{ title => "A",
author.username => "B",
author.try(:username) => "B",
tag_list.join(" ") => "B",
geozone.try(:name) => "B",
summary => "C",
Expand Down

0 comments on commit c8686df

Please sign in to comment.