Hyperlinks

5 views
Skip to first unread message

Joe Guerra

unread,
Jan 18, 2018, 11:11:36 AM1/18/18
to Ruby on Rails: Talk
Just wondering if it’s possible to handle hyperlinks in a controller.

I want to pass some variables from hyperlinks instead of using forms.

Thanks,
Joe

Hassan Schroeder

unread,
Jan 18, 2018, 4:31:24 PM1/18/18
to rubyonrails-talk
On Thu, Jan 18, 2018 at 8:11 AM, Joe Guerra <JGu...@jginfosys.com> wrote:
> Just wondering if it’s possible to handle hyperlinks in a controller.
>
> I want to pass some variables from hyperlinks instead of using forms.

Controllers receive requests and return responses.

What exactly do you mean by "handle hyperlinks"?

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Joe Guerra

unread,
Jan 18, 2018, 4:53:34 PM1/18/18
to Ruby on Rails: Talk
well, basically click on a link and have it do something on a controller.  I don't want to pass these values to the controller using forms, I'd like to know if it's possible to using hyperlinks.

radhames brito

unread,
Jan 18, 2018, 4:59:08 PM1/18/18
to Ruby on Rails: Talk
Hi Joe, I think you are asking about the query string, look here

The rails router can be used with HTTP GET methods to match arguments in the request URL, they then will appear in the params controller variable and you can use them.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a22e505b-09c3-4f30-9f35-4c65c486b361%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hassan Schroeder

unread,
Jan 18, 2018, 5:00:12 PM1/18/18
to rubyonrails-talk
On Thu, Jan 18, 2018 at 1:53 PM, Joe Guerra <JGu...@jginfosys.com> wrote:
> well, basically click on a link and have it do something on a controller.

Clicking a link causes the browser to send a request to a controller,
so that's covered...

> don't want to pass these values to the controller using forms, I'd like to
> know if it's possible to using hyperlinks.

What values?

Maybe this will help: https://en.wikipedia.org/wiki/Query_string

If not, please give a concrete example.
Reply all
Reply to author
Forward
0 new messages