On Jueves, 20 de Agosto de 2009 00:00:57 Soren Christensen escribió:
> Hi,
>
> I have a list view of a Klasses which has links to various teaches, IA,
> parent reps etc.
> All of those are done as Rail references with belong_to
>
> For the positions that are not filled AS offers "Create New".
>
> There must be a way to control the access level to this create.
>
> Wondering what it is.
>
> If I click it I get an error:
> Processing UsersController#new (for 76.247.187.116 at 2009-08-19
> 15:00:32) [GET] Parameters: {"parent_column"=>"klasses",
> "action"=>"new", "_method"=>"get", "adapter"=>"_list_inline_adapter",
> "controller"=>"users", "parent_id"=>"67", "parent_model"=>"Klass",
> "parent_controller"=>"klass"}
>
> NoMethodError (undefined method `klasses=' for
> #<User:0x2b807b7d58f8>):
Have you defined the reverse associations (has_many) for your belongs_to
associations? ActiveScaffold requires both associations defined to work.
For example:
class User
has_many :posts
end
class Post
belongs_to :user
end
--
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
-~----------~----~----~----~------~----~------~--~---