Sha256: 316b04f001c95839e74c5ae7aa7ae4e59be960a7026fdf828b8e60e108c29eff

Contents?: true

Size: 406 Bytes

Versions: 108

Compression:

Stored size: 406 Bytes

Contents

<% module_namespacing do -%>
class <%= class_name %> < <%= parent_class_name.classify %>
<% attributes.select {|attr| attr.reference? }.each do |attribute| -%>
  belongs_to :<%= attribute.name %>
<% end -%>
<% if !accessible_attributes.empty? -%>
  attr_accessible <%= accessible_attributes.map {|a| ":#{a.name}" }.sort.join(', ') %>
<% else -%>
  # attr_accessible :title, :body
<% end -%>
end
<% end -%>

Version data entries

108 entries across 85 versions & 13 rubygems

Version Path
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/activerecord-3.2.22.5/lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.22.5 lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.22.4 lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.22.3 lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.22.2 lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.22.1 lib/rails/generators/active_record/model/templates/model.rb
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.22 lib/rails/generators/active_record/model/templates/model.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.12/lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.21 lib/rails/generators/active_record/model/templates/model.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.18/lib/rails/generators/active_record/model/templates/model.rb
apl-library-0.0.90 vendor/bundle/ruby/1.8/gems/activerecord-3.2.18/lib/rails/generators/active_record/model/templates/model.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.18/lib/rails/generators/active_record/model/templates/model.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.18/lib/rails/generators/active_record/model/templates/model.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.18/lib/rails/generators/active_record/model/templates/model.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.8/gems/activerecord-3.2.18/lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.20 lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.19 lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.18 lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.17 lib/rails/generators/active_record/model/templates/model.rb