Skip to content

Commit

Permalink
Updated query style (#436) (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-barker authored and jywarren committed Apr 4, 2019
1 parent c8eba6e commit 37ea504
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/controllers/feeds_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ def all
end

def clean
@maps = Map.find(:all,:order => "id DESC",:limit => 20, :conditions => {:archived => false, :password => ''},:joins => :warpables, :group => "maps.id")
render :layout => false, :template => "feeds/clean"
@maps = Map.order(id: :desc)
.limit(20)
.where(archived: false, password: '')
.joins(:warpables)
.group("maps.id")
render layout: false, template: "feeds/clean"
response.headers["Content-Type"] = "application/xml; charset=utf-8"
end

Expand Down

0 comments on commit 37ea504

Please sign in to comment.