Sha256: cb42fdcbcd13936cbeaa3803c63aeeec78acd1e45ecf4d01996bd601c7f4aa9b

Contents?: true

Size: 532 Bytes

Versions: 6

Compression:

Stored size: 532 Bytes

Contents

class PersonController < ApplicationController
	# To make sure we can also display properly this person's elements
	helper :elt

	layout 'top'
	model :person

  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

  def list
    @person = Person.find(params[:id]) if @person == nil
		render :partial => '/person/listElts', :locals => { :person => @person }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
parlement-0.3 app/controllers/person_controller.rb
parlement-0.4 app/controllers/person_controller.rb
parlement-0.5 app/controllers/person_controller.rb
parlement-0.7 app/controllers/person_controller.rb
parlement-0.6 app/controllers/person_controller.rb
parlement-0.8 app/controllers/person_controller.rb