Hi, I am trying to namespace my models in a Rails app. I put this in routes
map.namespace(:property) do |property| property.root :controller => :venues, :active_scaffold => true property.resources :location_groups, :active_scaffold => true end
and this in app/controllers/property/venues_controller
module Property class VenuesController < ApplicationController active_scaffold Venue end end
this in app/modesl/property/venue
module Property class Venue < ActiveRecord::Base has_many :location_groups end end
this for app/controllers/property/location_groups_controller
module Property class LocationGroupsController < ApplicationController active_scaffold LocationGroup end end
and this for app/modesl/property/location_group
module Property class LocationGroup < ActiveRecord::Base belongs_to :venue end end
now if I try to load http://localhost:3000/property/location_groups/new
I get ActionView::TemplateError (Could not find Property::Property::VenuesController or Property::Property::VenueController)
I am confused as to how to do this correctly... any ideas? Am I correct to do this? I don't want all my models in one folder... I want to "package" them.