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
activerecord-3.2.7.rc1 lib/rails/generators/active_record/model/templates/model.rb
challah-0.6.2 vendor/bundle/gems/activerecord-3.2.6/lib/rails/generators/active_record/model/templates/model.rb
challah-0.6.2 vendor/bundle/gems/activerecord-3.2.3/lib/rails/generators/active_record/model/templates/model.rb
challah-0.6.2 vendor/bundle/gems/activerecord-3.2.5/lib/rails/generators/active_record/model/templates/model.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/rails/generators/active_record/model/templates/model.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/rails/generators/active_record/model/templates/model.rb
initforthe-cookies-0.0.1 vendor/bundle/gems/activerecord-3.2.6/lib/rails/generators/active_record/model/templates/model.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/rails/generators/active_record/model/templates/model.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/rails/generators/active_record/model/templates/model.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/rails/generators/active_record/model/templates/model.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/rails/generators/active_record/model/templates/model.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/rails/generators/active_record/model/templates/model.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/rails/generators/active_record/model/templates/model.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/rails/generators/active_record/model/templates/model.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.6 lib/rails/generators/active_record/model/templates/model.rb
challah-0.6.1 vendor/bundle/gems/activerecord-3.2.3/lib/rails/generators/active_record/model/templates/model.rb
challah-0.6.1 vendor/bundle/gems/activerecord-3.2.5/lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.5 lib/rails/generators/active_record/model/templates/model.rb
activerecord-3.2.4 lib/rails/generators/active_record/model/templates/model.rb