Skip to content

Commit

Permalink
fixed Hobo::Error namespace in router
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Oct 25, 2010
1 parent 0a808f8 commit 0671d3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hobo/lib/generators/hobo/routes/router.rb
Expand Up @@ -9,7 +9,7 @@ class Router
attr_reader :subsite, :controller, :model, :record, :records

def initialize(subsite, controller)
raise "#{controller} is not a Hobo::Controller::Model" unless controller < ::Hobo::Controller::Model
raise ::Hobo::Error, "#{controller} is not a Hobo::Controller::Model" unless controller < ::Hobo::Controller::Model
@subsite = subsite
@controller = controller
@model = controller.model
Expand Down Expand Up @@ -53,7 +53,7 @@ def owner_routes
routes = []
controller.owner_actions.each_pair do |owner, actions|
collection_refl = model.reverse_reflection(owner)
raise Hobo::Error, "Hob routing error -- can't find reverse association for #{model}##{owner} " +
raise ::Hobo::Error, "Hob routing error -- can't find reverse association for #{model}##{owner} " +
"(e.g. the :has_many that corresponds to a :belongs_to)" if collection_refl.nil?
collection = collection_refl.name
owner_class = model.reflections[owner].klass.name.underscore
Expand Down

0 comments on commit 0671d3c

Please sign in to comment.