link_to problems

S

sourj

Hi all,

I currently have an action in a controller that accepts input from a
form and it works fine. It recieves the data in a hash and uses that
well.

I now on another page want to submit data to that controller/action and
i cant seem to figure out how to encode the hash. It throws a wobbly on
the brackets and also i have tried {:search => {:searchterm}}. No joy.

Any ideas or suggestions welcome..

link_to eachtagobject.tag , :controller=>"portal", :action =>
"search_general",:search[:searchterm] => eachtagobject.tag

I could work around it by duplicating code and altering the
functionality slightly but that goes against the DRY principle. There
has to be a way.

all the best

Surj.
 
A

Austin Ziegler

Hi all,

I currently have an action in a controller that accepts input from a
form and it works fine. It recieves the data in a hash and uses that
well.

I now on another page want to submit data to that controller/action and
i cant seem to figure out how to encode the hash. It throws a wobbly on
the brackets and also i have tried {:search =3D> {:searchterm}}. No joy.

Any ideas or suggestions welcome..

link_to eachtagobject.tag , :controller=3D>"portal", :action =3D>
"search_general",:search[:searchterm] =3D> eachtagobject.tag

I could work around it by duplicating code and altering the
functionality slightly but that goes against the DRY principle. There
has to be a way.

It's best if you check out the lists at
http://lists.rubyonrails.org/mailman/listinfo for this sort of
request.

-austin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,181
Messages
2,570,970
Members
47,537
Latest member
BellCorone

Latest Threads

Top