2009/5/23 Mk 27 <rails-mailing-l...@andreas-s.net>

>
> I notice you cannot access another controller method from a view, eg.
>
> :action => "othersec/list"
>
> is no good; the action must belong to the corresponding controller


Not sure I follow you here, you can certainly link to a different controller
from a view, what is that you are trying to do?

Colin


>
>
> That being the case, I might as well just have one controller, "main",
> with methods like "list_that" and "list_this", ie, there is not much
> point in defining a controller for each table -- all that is needed is
> class definition in models/
>
> However "what seems to be the case" to me is not necessarily the way
> that it is -- I'm worried I may diverge too much from anything
> resembling *Best Practices* here, particularly since this means going
>
> script/generate controller this
> then erasing everything but the model definition (I tried erasing those
> two, and creating one "main.rb" with all the classes in, but then there
> is an error).
>
> Anyone have any thoughts on this?  After a bit of googling I found some
> stuff about inheritance governing this -- does that mean I should put
> the methods I want globally accessible in
> app/controllers/application_controller.rb?
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to