Sha256: 42aeedeae3fba1f870cf44929b622c28f7ccec19547eda094a0291aeed6be8a1

Contents?: true

Size: 694 Bytes

Versions: 11

Compression:

Stored size: 694 Bytes

Contents

class PatronRelationshipsController < InheritedResources::Base
  load_and_authorize_resource
  before_filter :prepare_options, :except => [:index, :destroy]

  def prepare_options
    @patron_relationship_types = PatronRelationshipType.all
  end

  def new
    @patron_relationship = PatronRelationship.new(params[:patron_relationship])
    @patron_relationship.parent = Patron.find(params[:patron_id]) rescue nil
    @patron_relationship.child = Patron.find(params[:child_id]) rescue nil
  end

  def update
    @patron_relationship = PatronRelationship.find(params[:id])
    if params[:move]
      move_position(@patron_relationship, params[:move])
      return
    end
    update!
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
enju_biblio-0.1.0.pre2 app/controllers/patron_relationships_controller.rb
enju_biblio-0.1.0.pre app/controllers/patron_relationships_controller.rb
enju_biblio-0.0.9 app/controllers/patron_relationships_controller.rb
enju_biblio-0.0.8 app/controllers/patron_relationships_controller.rb
enju_biblio-0.0.7 app/controllers/patron_relationships_controller.rb
enju_biblio-0.0.6 app/controllers/patron_relationships_controller.rb
enju_biblio-0.0.5 app/controllers/patron_relationships_controller.rb
enju_biblio-0.0.4 app/controllers/patron_relationships_controller.rb
enju_biblio-0.0.3 app/controllers/patron_relationships_controller.rb
enju_biblio-0.0.2 app/controllers/patron_relationships_controller.rb
enju_biblio-0.0.1 app/controllers/patron_relationships_controller.rb