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
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
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.
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
4 matches
Mail list logo