Skip to content

Instantly share code, notes, and snippets.

@mghaught
Created October 14, 2011 17:03
Show Gist options
  • Save mghaught/1287679 to your computer and use it in GitHub Desktop.
Save mghaught/1287679 to your computer and use it in GitHub Desktop.
NPS
class Project
include Ripple::Document
property :name, String, :presence => true
property :survey_text, String, :presence => true
property :follow_up_text, String
many :scores
timestamps!
def self.seed
new(:survey_text => "How likely are you to recommend us to a friend or colleague?")
end
end
class Score
include Ripple::Document
one :project
property :score, Integer, :default => 0
property :answer, String
timestamps!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment