this belongs_to should be created by schema_associations
removed some duplicated logic from scopes
removed finished? as it does not make much sense
fixed typo and moved between_dates to a private method
unified the methods to decide which notification to send based on channel presence into one single method that relies on naming convetion of the notification_types
Unifying the observer notifications using the transition object in the after_transition hook. Also isolated better some observer logic regarding notifications.
removed duplicated logic and moved to a private method
I don't think is worth keeping this method for using it only twice and actually we spare only one negation, since the other if could be used as unless. KISS
we dont need the dependent: destroy because we dont actually destroy projects anymore, now this associations can be done via schema_associations
should_fail? cannot be private because its called from the state_machine :(
fixed wrong notification_type names
we need the has_many :rewards so the accepts_nested_attributes_for will work on the first time we run migrations
Merge pull request #372 from diogob/refactor_project

Refactor project model