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

Version Path
enju_biblio-0.1.0.pre49 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre48 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre47 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre46 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre45 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre44 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre43 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre42 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre41 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre40 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre39 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre38 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre37 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre36 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre35 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre34 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre33 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre32 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre31 app/controllers/countries_controller.rb
enju_biblio-0.1.0.pre30 app/controllers/countries_controller.rb