Sha256: 35dd0e20193dcb2f0b05f8b8887cb2375372fbbb77c589c06499f4f1c9e772ce
Contents?: true
Size: 432 Bytes
Versions: 3
Compression:
Stored size: 432 Bytes
Contents
has_and_belongs_to_many :<%= user_class.table_name %>, :join_table => :<%= join_table %> <% if Rails::VERSION::MAJOR < 5 %> belongs_to :resource, :polymorphic => true <% else %> belongs_to :resource, :polymorphic => true, :optional => true <% end %> validates :resource_type, :inclusion => { :in => Rolify.resource_types }, :allow_nil => true scopify
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rolify-6.0.1 | lib/generators/active_record/templates/model.rb |
rolify-6.0.0 | lib/generators/active_record/templates/model.rb |
rolify-5.3.0 | lib/generators/active_record/templates/model.rb |