Class: Admin::Shots::ShowPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/admin/shots/show_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(id, user) ⇒ ShowPresenter

Returns a new instance of ShowPresenter.


2
3
4
5
# File 'app/presenters/admin/shots/show_presenter.rb', line 2

def initialize(id, user)
  @id = id
  @user = user
end

Instance Method Details

#animalsObject


11
12
13
# File 'app/presenters/admin/shots/show_presenter.rb', line 11

def animals
  Animal.where(:organization_id => @user.organization_id).collect{|x| [x.id.to_s,x.name.to_s]}
end

#shotObject


7
8
9
# File 'app/presenters/admin/shots/show_presenter.rb', line 7

def shot
  Shot.find(@id)
end