On 1 March 2014 19:20, Brandon <wongw...@gmail.com> wrote:
> 1. Users_Controller CRUD expects param[:id] to create User instance. With
> Orders_Controller, I'd like to retrieve a list of users who have ordered. I
> know Orders_Controller expects param[:id] to be for creating Order instance.
> So does this mean if I want to retrieve a list of users who have ordered, I
> should create a method called 'get_orders' in Users_Controller?
>
> 2. Can user's id be passed as the param[:id] for controllers other than
> Users_Controller? I find that it seems to make CanCan hard to maintain.
>
> 3. There seem to be too many methods in Users_Controller (e.g. deactivate,
> change_role, etc.). How do you organise them/reduce them?

It seems there are a lot of basic things that you have not yet got the
hang of.  I suggest that you start by working right through a good
tutorial such as railstutorial.org (which is free to use online) which
will show you the basics of rails, so that you will be able to answer
most questions yourself.

Colin


>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/18a42aa1-a4fb-425b-a182-1db5faff0a6f%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuJcjXLJFPaDJysKRRL7D08Zqd0CkXL1E9fOPKKBuQnXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to