[Rails] Accessing vars within helpers in Markaby

John Smith john_smith_45678 at yahoo.com
Sat Jul 29 21:33:16 GMT 2006


I've been trying to figure out how to do this:

select_tag 'site_id',
@helpers.options_from_collection_for_select(Site.find(:all,
:order=>'name'), 'id', 'name', @site_id)

The select_tag gets output fine, but the default value
isn't set. @site_id is set in the controller (@site_id
= cookies[:site_id]). In the Markaby template 'text
@site_id' shows the value does in fact exist. I
suspect it might be related to the @helpers issue, but
I'm not sure. Any idea how to make this work?

Thanks,
John

-- 
Posted via http://www.ruby-forum.com/.


More information about the Rails mailing list