Sha256: 69ff20ebfbbce262f5d0e322ac8bfbcf753a04813f354fc8f9b469b634a9f22b
Contents?: true
Size: 763 Bytes
Versions: 40
Compression:
Stored size: 763 Bytes
Contents
class PatronRelationshipsController < InheritedResources::Base respond_to :html, :json has_scope :page, :default => 1 load_and_authorize_resource before_filter :prepare_options, :except => [:index, :destroy] 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 private def prepare_options @patron_relationship_types = PatronRelationshipType.all end end
Version data entries
40 entries across 40 versions & 1 rubygems