Class: PersonController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- PersonController
- Defined in:
- app/controllers/person_controller.rb
Instance Method Summary collapse
Instance Method Details
#list ⇒ Object
15 16 17 18 |
# File 'app/controllers/person_controller.rb', line 15 def list @person = Person.find(params[:id]) render :partial => '/person/listElts', :locals => { :person => @person } end |
#show ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'app/controllers/person_controller.rb', line 6 def show @person = Person.find(params[:id]) @title = @person.name+' (parlement)' rescue ActiveRecord::RecordNotFound => e flash[:error] = "Person '#{params[:id]}' does not exist" redirect_to '/' end |