Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create
- has_active_authorization = PatientAuthorization.find(params[:visit][:patient_authorization_id])
- if has_active_authorization.active
- @visit = Visit.new(params[:visit])
- end
- respond_to do |format|
- if @visit.save
- format.html { redirect_to(@visit, :notice => 'Visit was successfully created.') }
- format.xml { render :xml => @visit, :status => :created, :location => @visit }
- else
- format.html { render :action => "new" }
- format.xml { render :xml => @visit.errors, :status => :unprocessable_entity }
- end
- end
- end
Add Comment
Please, Sign In to add comment