Sha256: 478aeb43e26596fb4d02233cb61a0c25588b9a20391b25996605fd19023f4089

Contents?: true

Size: 1.32 KB

Versions: 15

Compression:

Stored size: 1.32 KB

Contents

class <%= class_name %>
  include Mongoid::Document
<%- unless options[:skip_timestamps] -%>
  include Mongoid::Timestamps
<%- end -%>

  # Attributes =====================================================================================
<%- for attribute in model_attributes -%>
  field :<%= attribute.name %><%= attribute.type.to_s.downcase == "string" ? "" : ", :type => #{attribute.type.to_s.capitalize}" -%>

<%- end -%>

  # Indices ========================================================================================

  # Constants ======================================================================================

  # Scopes =========================================================================================

  # Relationships ==================================================================================

  # Behavior =======================================================================================

  # Callbacks ======================================================================================

  # Validations ====================================================================================

  # Class methods ==================================================================================

  # Instance methods ===============================================================================
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
scaffold_logic-2.0.0 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.7.9 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.7.8 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.7.7 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.7.6 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.7.5 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.7.4 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.7.3 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.7.2 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.7.1 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.7.0 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.6.3 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.6.2 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.6.1 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb
scaffold_logic-1.6.0 lib/generators/scaffold_logic/scaffold/templates/mongoid_model.rb