Sha256: 9ff9f9eae77660d7442e22756f3ba9bed4dfc7101ef251411fc91794ea18fc46

Contents?: true

Size: 286 Bytes

Versions: 6

Compression:

Stored size: 286 Bytes

Contents

class <%= klass %>
  include Mongoid::Document
  include Statesman::Adapters::MongoidTransition

  field :to_state, type: String
  field :sort_key, type: Integer
  field :statesman_metadata, type: Hash

  index({ sort_key: 1 })

  belongs_to :<%= parent.underscore %>, index: true

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
statesman-0.5.0 lib/generators/statesman/templates/mongoid_transition_model.rb.erb
statesman-0.4.0 lib/generators/statesman/templates/mongoid_transition_model.rb.erb
statesman-0.3.0 lib/generators/statesman/templates/mongoid_transition_model.rb.erb
statesman-0.2.1 lib/generators/statesman/templates/mongoid_transition_model.rb.erb
statesman-0.2.0 lib/generators/statesman/templates/mongoid_transition_model.rb.erb
statesman-0.1.0 lib/generators/statesman/templates/mongoid_transition_model.rb.erb