Class: GoAction

Inherits:
Action
  • Object
show all
Defined in:
app/models/actions/go_action.rb

Constant Summary

Constants inherited from Action

Action::GIVE_TYPES

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Action

create_of_type, from_open_struct, #full_details, #give_action_subtypes, #hear_action_subtypes, recent, #set_creator, #set_params, #to_open_struct, #unstarred?

Methods included from OhNoes::Destroy

#destroy, #destroyable?

Class Method Details

.for(show, person, occurred_at = nil) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'app/models/actions/go_action.rb', line 10

def self.for(show, person, occurred_at=nil)
  GoAction.new.tap do |go_action|
    go_action.person = person
    go_action.subject = show
    go_action.details = "attended #{show.event}"
    go_action.organization = show.organization
    go_action.occurred_at = ( occurred_at.nil? ? show.datetime : occurred_at )
  end
end

Instance Method Details

#action_typeObject



2
3
4
# File 'app/models/actions/go_action.rb', line 2

def action_type
  "Go"
end

#sentenceObject



20
21
22
# File 'app/models/actions/go_action.rb', line 20

def sentence
  details
end

#verbObject



6
7
8
# File 'app/models/actions/go_action.rb', line 6

def verb
  "attended"
end