Namespacing models in rails has some problems: http://blog.hasmanythrough.com/2008/5/6/a-simple-alternative-to-namespaced- models http://m.onkey.org/2007/12/9/namespaced-models
I think your problem is with associations, try to set :class_name option in your associations. On Sábado, 4 de Julio de 2009 11:44:47 slava escribió: > 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. > -- Sergio Cambra .:: entreCables S.L. ::. Mariana Pineda 23, 50.018 Zaragoza T) 902 021 404 F) 976 52 98 07 E) [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
