Skip to content

Instantly share code, notes, and snippets.

@AndyObtiva
Last active December 26, 2015 07:09
Show Gist options
  • Save AndyObtiva/7113604 to your computer and use it in GitHub Desktop.
Save AndyObtiva/7113604 to your computer and use it in GitHub Desktop.
Project::Detail
class Project::Detail < Project
validates :business_concept_mission, presence: true, length: {maximum: 4000}
validates :goals_essay, presence: true, length: {maximum: 4000}
validates :good_investment_proposition, presence: true, length: {maximum: 4000}
after_update :complete!
private
def complete!
update_attribute(:status, 'completed')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment