Class: Fulcrum::Cloudfuji::EventObservers::ProjectObserver
- Inherits:
-
Cloudfuji::EventObserver
- Object
- Cloudfuji::EventObserver
- Fulcrum::Cloudfuji::EventObservers::ProjectObserver
- Defined in:
- lib/fulcrum/cloudfuji/event_observers/project_observer.rb
Instance Method Summary collapse
Instance Method Details
#project_created ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fulcrum/cloudfuji/event_observers/project_observer.rb', line 6 def project_created puts params.inspect puts "prarm" data = params['data'] project = Project.find_by_ido_id(data['ido_id']) project ||= Project.new # Just in case project.ido_id ||= data['ido_id'] project.name = data['name'] project.point_scale = 'linear' || data['point_scale'] # TODO: Put in a reverse lookup project.iteration_start_day = data['iteration_start_day'] project.iteration_length = data['iteration_length'] project.save! end |
#project_imported ⇒ Object
24 25 26 |
# File 'lib/fulcrum/cloudfuji/event_observers/project_observer.rb', line 24 def project_imported project_created end |