Open olegantonyan opened 9 years ago
Hi! I have a problem with rolify+paper_trail. My role model:
class Role < ActiveRecord::Base has_paper_trail scopify has_and_belongs_to_many :user_company_memberships, :join_table => :user_company_memberships_roles belongs_to :resource, :polymorphic => true validates :resource_type, :inclusion => { :in => Rolify.resource_types }, :allow_nil => true validates :name, presence: true, uniqueness: true, length: {:in => 2..30} end
Trying to create a role:
Role.create(name: 'admin') NameError: uninitialized constant Role::Resource from /usr/local/lib/ruby/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/inheritance.rb:158:in `compute_type'
But without has_paper_trail it works just fine. Rails 4.2.1
has_paper_trail
Same here, would be good to have paper_trail enabled for the roles.
Hi! I have a problem with rolify+paper_trail. My role model:
Trying to create a role:
But without
has_paper_trail
it works just fine. Rails 4.2.1