[Rails] Re: some success at last, and some questions

2010-02-10 Thread Bigos
class ContactsController ApplicationController   def index     �...@current_tab = 'Contact Us'   end end in a helper, probably application_helper.rb def tab_link(tab_name, target)    link_to(tab_name, target, :class = tab_name == @current_tab ? 'current_tab' : 'jtab') end Is it OK

[Rails] Re: some success at last, and some questions

2010-02-09 Thread Frederick Cheung
On Feb 9, 9:20 am, Bigos ruby.obj...@googlemail.com wrote: So here are my questions: 1 Is it appropriate to put such code here? No. You don't really want any code in your view, other than the very bare minimum. Sounds like you want to put a l lot of this in a view helper 2 how can I

[Rails] Re: some success at last, and some questions

2010-02-09 Thread Bigos
On Feb 9, 9:24 am, Frederick Cheung frederick.che...@gmail.com wrote: On Feb 9, 9:20 am, Bigos ruby.obj...@googlemail.com wrote: So here are my questions: 1 Is it appropriate to put such code here? No. You don't really want any code in your view, other than the very bare minimum.

Re: [Rails] Re: some success at last, and some questions

2010-02-09 Thread Rick DeNatale
On Tue, Feb 9, 2010 at 4:31 AM, Bigos ruby.obj...@googlemail.com wrote: On Feb 9, 9:24 am, Frederick Cheung frederick.che...@gmail.com wrote: On Feb 9, 9:20 am, Bigos ruby.obj...@googlemail.com wrote: So here are my questions: 1 Is it appropriate to put such code here? No. You don't