Class: RelationshipsController

Inherits:
ArtfullyOseController show all
Defined in:
app/controllers/relationships_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
13
# File 'app/controllers/relationships_controller.rb', line 5

def index
  @person = Person.find(params_person_id)

  if params[:relation_id].present?
    @relationships = @person.relationships.where(:relation_id => params[:relation_id].to_i)
  else
    @relationships = @person.relationships
  end
end