Class: PersonController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/person_controller.rb

Instance Method Summary collapse

Instance Method Details

#listObject



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

#showObject



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