jackdempsey / acts_as_commentable

The ActiveRecord acts_as_commentable plugin
http://juixe.com/svn/acts_as_commentable/
MIT License
834 stars 178 forks source link

problem when added to engine #47

Closed mido18 closed 10 years ago

mido18 commented 10 years ago

When i created engine and added acts_as_commentable as a add_dependency and tried to run tests i get this error

4.0.2/lib/active_record/dynamic_matchers.rb:22:in method_missing': undefined local variable or methodacts_as_commentable' for Post(no database connection):Class (NameError)

Here is also my class definition

class Post < ActiveRecord::Base belongs_to :user belongs_to :group acts_as_commentable validates :body,:user,:group, presence: true end

mido18 commented 10 years ago

my mistake sorry :) i just fixed it with this adding this line to lib/gem_name.rb

require 'acts_as_commentable'