Skip to content

Commit

Permalink
Fix brakeman
Browse files Browse the repository at this point in the history
  • Loading branch information
roschaefer committed Jul 31, 2018
1 parent e2ec18e commit 61ee7d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/app/controllers/statistic/broadcasts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def index
}
direction = order_mapping[statistics_params[:direction]] || 'DESC NULLS LAST'
order_by_clause = [column, direction].join(' ')
order_by_clause = ActiveRecord::Base.sanitize(order_by_clause)

@statistics = Statistic::Broadcast.order(order_by_clause).order(title: :asc).page(page).per(per_page)
render json: @statistics, meta: { total_pages: @statistics.total_pages }
Expand Down

0 comments on commit 61ee7d2

Please sign in to comment.