Skip to content

Commit

Permalink
Clear out most of deprecations in tag controller.
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Nov 20, 2014
1 parent aa2a6c6 commit de1142c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/tag_controller.rb
Expand Up @@ -5,7 +5,7 @@ class TagController < ApplicationController
before_action :set_query_date, :only => [:popular_by_day, :popular_by_week, :popular_by_month]

def cloud
@tags = Tag.find(:all, :conditions => "post_count > 0", :order => "post_count DESC", :limit => 100).sort { |a, b| a.name <=> b.name }
@tags = Tag.where("post_count > 0").order(:post_count => :desc).limit(100).sort { |a, b| a.name <=> b.name }
end

# Generates list of tag names matching parameter term.
Expand Down Expand Up @@ -75,7 +75,7 @@ def index
end

@tags = if limit
@tags.paginate :per_page => limit, :page => page_number, :order => order
@tags.order(order).paginate :per_page => limit, :page => page_number
else
@tags.order order
end
Expand Down

0 comments on commit de1142c

Please sign in to comment.