Skip to content

Commit

Permalink
Removed some deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Souravirus committed Jul 2, 2018
1 parent 2d7b1c7 commit 29deb58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/notes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def places
.references(:term_data)
.where('term_data.name = ?', 'chapter')
.group('node.nid')
.order('max(node_revisions.timestamp) DESC, node.nid')
.order(Arel.sql('max(node_revisions.timestamp) DESC, node.nid'))
.paginate(page: params[:page], per_page: 24)

render template: 'notes/tools_places'
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/questions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def show
@tags = @node.power_tag_objects('question')
@tagnames = @tags.collect(&:name)
@users = @node.answers.group(:uid)
.order('count(*) DESC')
.order(Arel.sql('count(*) DESC'))
.collect(&:author)

set_sidebar :tags, @tagnames
Expand Down

0 comments on commit 29deb58

Please sign in to comment.