How to appoint a $j.current.m object ?
I read the source code of jamal, i don't get it .
Thank you.
Alex
2009/3/18 浩翔 <blacka...@gmail.com>:
>
> I know.
> $j.current.m is the singular form of the controller name.
Problem solved?
If you have a users_controller.js in app/controllers and configure
jamal with eg {controller:users,action:index} you can use $j.current.m
in the controller without doing anything. The model is created on the
fly. But if you like to add a method to the user model you have to
create app/models/user.js:
$j.m({User:{
yourMethod: function(){}
}});
Cheers,
Timo
--
Timo Derstappen