Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed unnesccesary set_team funcs #398

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading