Module: RushJob::SortHelper
- Included in:
- RushJobsController, RushJobsHelper
- Defined in:
- app/helpers/rush_job/sort_helper.rb
Instance Method Summary collapse
Instance Method Details
#sort_column ⇒ Object
3 4 5 |
# File 'app/helpers/rush_job/sort_helper.rb', line 3 def sort_column RushJob.column_names.include?(params[:sort]) ? params[:sort] : 'id' end |
#sort_direction ⇒ Object
7 8 9 |
# File 'app/helpers/rush_job/sort_helper.rb', line 7 def sort_direction %w[asc desc].include?(params[:direction]) ? params[:direction] : 'asc' end |