Sha256: 2aafe4f54c30ee960758df8ac44b9a4989be40c69a938b8f489aef85b4b8e8bf

Contents?: true

Size: 1.26 KB

Versions: 35

Compression:

Stored size: 1.26 KB

Contents

# -*- encoding: utf-8 -*-
class LibraryGroupsController < ApplicationController
  load_and_authorize_resource
  cache_sweeper :library_group_sweeper, :only => [:update]

  # GET /library_groups
  # GET /library_groups.json
  def index
    @library_groups = LibraryGroup.all

    respond_to do |format|
      format.html # index.html.erb
      format.json { render :json => @library_groups }
    end
  end

  # GET /library_groups/1
  # GET /library_groups/1.json
  def show
    respond_to do |format|
      format.html # show.html.erb
      format.json { render :json => @library_group }
    end
  end

  # GET /library_groups/1/edit
  def edit
    @countries = Country.all
  end

  # PUT /library_groups/1
  # PUT /library_groups/1.json
  def update
    respond_to do |format|
      if @library_group.update_attributes(params[:library_group])
        expire_page '/page/opensearch'
        format.html { redirect_to @library_group, :notice => t('controller.successfully_updated', :model => t('activerecord.models.library_group')) }
        format.json { head :no_content }
      else
        @countries = Country.all
        format.html { render :action => "edit" }
        format.json { render :json => @library_group.errors, :status => :unprocessable_entity }
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
enju_library-0.1.0.pre33 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre32 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre31 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre30 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre29 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre28 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre27 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre26 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre25 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre24 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre23 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre22 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre21 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre20 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre19 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre18 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre17 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre16 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre15 app/controllers/library_groups_controller.rb
enju_library-0.1.0.pre14 app/controllers/library_groups_controller.rb