johnk
February 12, 2006, 1:06am
1
Been a while since I programmed in Ruby and Rails and some of the
basic concepts I just loose so quickly. This one I can’t find any
examples of.
I want to pass two pieces of information in my URL. The :id plus I
want to pass my user_id. How do I pass it using the link_to?
Stupid question I know… but I can’t find the answer.
John K.
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference
johnk
February 12, 2006, 1:17am
2
On Sat, 2006-02-11 at 19:05 -0500, John K. wrote:
Been a while since I programmed in Ruby and Rails and some of the
basic concepts I just loose so quickly. This one I can’t find any
examples of.
I want to pass two pieces of information in my URL. The :id plus I
want to pass my user_id. How do I pass it using the link_to?
Stupid question I know… but I can’t find the answer.
http://rails.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html
Craig
johnk
February 12, 2006, 1:24am
3
Thanks, I have tried there, I personally could not find anything
there, I was wondering if someone had an example I can work from?
On 11-Feb-06, at 7:17 PM, Craig W. wrote:
http://rails.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html
Craig
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
John K.
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference
johnk
February 12, 2006, 1:29am
4
link_to ‘fake url’, :action => ‘fake_action’, :id => 5, :user_id => 7
johnk
February 12, 2006, 1:38am
5
Thanks Pat. Is there a way to get it so that the URL appears like:
http://www.something.com/controller/fake_action/5/user_id/7
instead of:
http://www.something.com/controller/fake_action/5?user_id=7
Thanks!
On 11-Feb-06, at 7:29 PM, Pat M. wrote:
Stupid question I know… but I can’t find the answer.
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
John K.
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference
johnk
February 12, 2006, 1:45am
6
In your routes.rb file put:
map.connect ‘:controller/:action/:id/user_id/:user_id’