Skip to content

Commit

Permalink
Merge pull request #398 from wearepal/rescue-hitfix
Browse files Browse the repository at this point in the history
removed unnesccesary set_team funcs
  • Loading branch information
paulthatjazz authored Jul 22, 2024
2 parents e954790 + 2de46eb commit 84c786b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 39 deletions.
8 changes: 0 additions & 8 deletions app/controllers/label_schemas_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ def set_label_schema
redirect_to root_url, alert: 'Label schema not found'
end

def set_team
@team = Team.find(params[:team_id])
authorize_for! @team
rescue ActiveRecord::RecordNotFound => e
Rails.logger.error "Team not found: #{e.message}"
redirect_to root_url, alert: 'Team not found'
end

def schema_params
params.require(:label_schema).permit(:name)
rescue ActionController::ParameterMissing => e
Expand Down
11 changes: 0 additions & 11 deletions app/controllers/memberships_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,4 @@ def destroy
redirect_to root_url, alert: 'Membership not found'
end
end

private

def set_team
begin
@team = Team.find(params[:team_id])
rescue ActiveRecord::RecordNotFound => e
Rails.logger.error "Team not found: #{e.message}"
redirect_to root_url, alert: 'Team not found'
end
end
end
11 changes: 0 additions & 11 deletions app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,4 @@ def destroy
redirect_to root_url, alert: 'Project not found'
end
end

private

def set_team
begin
@team = Team.find(params[:team_id])
rescue ActiveRecord::RecordNotFound => e
Rails.logger.error "Team not found: #{e.message}"
redirect_to root_url, alert: 'Team not found'
end
end
end
9 changes: 0 additions & 9 deletions app/controllers/regions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,4 @@ def map_view_encoding(region)

Base58.binary_to_base58 io.string.b, :bitcoin
end

def set_team
begin
@team = Team.find(params[:team_id])
rescue ActiveRecord::RecordNotFound => e
Rails.logger.error "Team not found: #{e.message}"
redirect_to root_url, alert: 'Team not found'
end
end
end

0 comments on commit 84c786b

Please sign in to comment.