On Viernes, 17 de Septiembre de 2010 01:52:22 Iñaki Baz Castillo escribió: > 2010/9/16 Iñaki Baz Castillo <[email protected]>: > > And finally I've got it working with AS master branch by doing an ugly > > hack: > > > > - I've created a controllers/web_users_controllers.rb with AS empty > > stuff: > > > > class WebUsersController < ApplicationController > > active_scaffold :web_users do |config| > > end > > end > > > > - I've added "map.resources :web_users, :active_scaffold => true" in > > routes.rb. > > > > > > And it works :) > > > > So I strongly think this is a bug in AS master branch as AS doesn't > > need, at all, to render web_users_controller. > > In fact I've made it more ellegant by using WebUser as model for > Devise, and WebUsersController for AS controller (instead of > AdminWebUsersController as before). In this way I have no problem with > AS master branch. > > However, I strongly think that AS master branch gets confused with this: > > class AdminWebUsersController < ApplicationController > active_scaffold :web_users do |config| > > This is, the controller name doesn't match the model being using by AS > in this controller. Of course this shouldn't be a problem, but it is > in AS master branch (as changing it makes it to work).
Yes, it's a problem, ActiveScaffold cannot guess controller. It's better to use namespaced models in that case, such as Admin::WebUsersController, inside an admin directory. In rails-2.3 branch, looking for a form partial override didn't use active_scaffold_controller_for. If you want to keep using that controller name you will have to override active_scaffold_controller_for: http://github.com/activescaffold/active_scaffold/wiki/API:-Core Look at bottom of that URL. It was changed to load form partial overrides in a subform from controller subform controller. -- 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.
