Skip to content

Commit

Permalink
update syntax of active record query(license method) (publiclab#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
ananya authored and chen-robert committed Dec 5, 2019
1 parent 7c4629b commit d2d482e
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 @@ -18,8 +18,12 @@ def clean
end

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

Expand Down

0 comments on commit d2d482e

Please sign in to comment.