It depends how you send that value to the controller.

If you use a form to submit data, then params[:date8] would work.

If you use a link, then you need to append the value to the link, like http://www.yourdomain.com/controller/method?date8=value

--
Yong Gu
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Friday, April 19, 2013 at 11:03 PM, Ronald Zhang wrote:

I currently have javascript in my view and it contains inputs so users
can input values

<input type = "text" name = "date8" id = "date8" value = "" size =25 >

I want to be able to access the value in this input once a method in my
controller is called. How can I do this? params[date8] does not work
which makes sense since it isnt a ruby textfield. Anyone have any ideas?
Thanks

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

--
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 (mailto:rubyonrails-talk+unsubscribe@googlegroups.com).
To post to this group, send email to rubyonrails-talk@googlegroups.com (mailto:rubyonrails-talk@googlegroups.com).
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 8 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedApr 19, '13 at 3:04p
activeApr 19, '13 at 10:51p
posts8
users3
websiterubyonrails.org
irc#RubyOnRails

3 users in discussion

Ronald Zhang: 4 posts Yong Gu: 3 posts Tamouse: 1 post

People

Translate

site design / logo © 2021 Grokbase