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