Hi,
I am a newbie to Hobo and currently experimenting with the recipe
model.
My recipe model is as below,
class Recipe < ActiveRecord::Base
hobo_model # Don't put anything above this
fields do
name :string
body :markdown
timestamps
end
belongs_to :author, :class_name => "User"
has_many :comments, :dependent => :destroy
has_many :images, :dependent => :destroy
has_many :answers, :dependent => :destroy
has_many :questions, :through => :answers, :uniq => true
and the recipe controller is,
class RecipesController < ApplicationController
hobo_model_controller
auto_actions :index, :show, :edit, :update, :destroy
auto_actions_for :author, [:index, :new, :create]
Now, i get a weird error when i start the server
c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:
176:in `owner
_routes': Hob routing error -- can't find reverse association for
Recipe#author
(e.g. the :has_many that corresponds to a :belongs_to) (HoboError)
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/
model_router.rb:
174:in `each_pair'
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/
model_router.rb:
174:in `owner_routes'
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/
model_router.rb:
144:in `add_routes'
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/
model_router.rb:
115:in `initialize'
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/
model_router.rb:
97:in `new'
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/
model_router.rb:
97:in `add_routes_for'
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/
model_router.rb:
97:in `each'
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/
model_router.rb:
97:in `add_routes_for'
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/
model_router.rb:
83:in `add_routes'
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/
model_router.rb:
83:in `each'
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/
model_router.rb:
83:in `add_routes'
from c:/ruby/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo.rb:
73:in `add_ro
utes'
from C:/ruby-apps/cookbook/config/routes.rb:6
from c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controll
er/routing/route_set.rb:226:in `draw'
from C:/ruby-apps/cookbook/config/routes.rb:1
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_suppo
rt/dependencies.rb:145:in `load_without_new_constant_marking'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_suppo
rt/dependencies.rb:145:in `load'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_suppo
rt/dependencies.rb:521:in `new_constants_in'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_suppo
rt/dependencies.rb:145:in `load'
from c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controll
er/routing/route_set.rb:286:in `load_routes!'
from c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controll
er/routing/route_set.rb:286:in `each'
from c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controll
er/routing/route_set.rb:286:in `load_routes!'
from c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controll
er/routing/route_set.rb:266:in `reload!'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/
initializer.rb:515:i
n `initialize_routing'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/
initializer.rb:186:i
n `process'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/
initializer.rb:113:i
n `send'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/
initializer.rb:113:i
n `run'
from C:/ruby-apps/cookbook/config/environment.rb:9
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `ge
m_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `re
quire'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_suppo
rt/dependencies.rb:156:in `require'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_suppo
rt/dependencies.rb:521:in `new_constants_in'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_suppo
rt/dependencies.rb:156:in `require'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/
server.rb:8
4
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `ge
m_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `re
quire'
from script/server:3
Can anyone please help me out on this? I am running Hobo -0.8.7 with
rails 2.3.2.
Thanks
Raghu
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---