Sha256: 1e8d7e6daf0412b06b1b0741694fbba921fd1934bc011d0ac7d8dbbd987de7da
Contents?: true
Size: 457 Bytes
Versions: 29
Compression:
Stored size: 457 Bytes
Contents
class CountriesController < InheritedResources::Base respond_to :html, :json load_and_authorize_resource def index @countries = Country.page(params[:page]) respond_to do |format| format.html # index.html.erb format.json { render :json => @countries } end end def update @country = Country.find(params[:id]) if params[:move] move_position(@country, params[:move]) return end update! end end
Version data entries
29 entries across 29 versions & 1 rubygems