Do I need to add extend my classes with Machinist::Machinable?

21 views
Skip to first unread message

Vojto Rinik

unread,
Aug 6, 2010, 6:50:03 PM8/6/10
to Machinist Users
Hey there,

so I keep getting

undefined method `blueprint' for Project:Class (NoMethodError)

Should I manually extend my class with this Machinable thing? I
thought this was happening automatically.

--

My blueprints.rb:

require 'machinist/mongoid'

Project.blueprint do
name
end

--

My Gemfile:

group :test do
gem "rspec-core", ">= 2.0.0.beta.12"
gem "rspec-rails", ">= 2.0.0.beta.12"
gem "rack"
gem "rack-test"
gem "capybara"
gem 'database_cleaner'
gem 'machinist', '>= 2.0.0.beta1'
gem 'machinist_mongo', :git => 'git://github.com/nmerouze/
machinist_mongo.git', :branch => 'machinist2'
gem 'webmock'
gem 'mocha'
gem 'autotest'
gem 'autotest-rails'
gem 'spork'
end

Pete Yandell

unread,
Aug 6, 2010, 8:27:42 PM8/6/10
to Machinist Users


On Aug 7, 8:50 am, Vojto Rinik <zero0...@gmail.com> wrote:
> Should I manually extend my class with this Machinable thing? I
> thought this was happening automatically.

Looking at the code for machinist_mongo, it seems like it should be
happening automatically, assuming Project includes Mongoid::Document.

You might want to ping the machinist_mongo author about it, as I don't
use Mongo and don't really know a lot about it.

- Pete
Reply all
Reply to author
Forward
0 new messages