Method: FacetsController#sort

Defined in:
app/controllers/facets_controller.rb

#sortObject



45
46
47
48
49
50
51
# File 'app/controllers/facets_controller.rb', line 45

def sort
  @facetsInScope = Facet.where("catalog_id = ?", @catalog.id)   
  params[:facet].each_with_index do |id, index|
    @facetsInScope.update(id, :position => index)     
  end
  render :nothing => true   
end