[Rails] Re: button_to (passing paramters again)

2017-02-15 Thread Scott Jacobsen
Controller action methods do not take parameters. You get the parameters from the `params` hash. Also, as was mentioned, do not send user_id as a param. It is a security error, and you don't need to because you can access the session in the controller: def add_to_cart product_id =

Re: [Rails] button_to (passing paramters again)

2017-02-15 Thread Hassan Schroeder
On Wed, Feb 15, 2017 at 4:11 PM, Joe Guerra wrote: > I've got this in my product show pageI'm trying to pass user_id & > product_id to my products controller, add_to_cart method... Accepting user_id as an untrusted input from the client is a Very Bad Idea. If it's a

[Rails] A Hackathon between Police and Youth of Color? The Time is Now. This weekend (February 17- 19, 2017)

2017-02-15 Thread Kalimah Priforce
A Hackathon between Police and Youth of Color? The Time is Now. This weekend (February 17- 19, 2017), Qeyno Labs launches the first UbuntuHack — a hackathon between communities in conflict. As the newest member of Hackathon Academy, UbuntuHack in Oakland

[Rails] button_to (passing paramters again)

2017-02-15 Thread Joe Guerra
I am pretty close to figuring this out... I've got this in my product show pageI'm trying to pass user_id & product_id to my products controller, add_to_cart method... <%= button_to 'Add to Cart', {:controller => "products", :action => "add_to_cart", :user_id=> session[:user_id],

[Rails] Urgent Requirement of Ruby on Rails Developer in Portland, OR on Contract

2017-02-15 Thread Ravi Kumar
*Position: Ruby on Rails Developer* *Location: Portland, Oregon* *Duration: 12+ Months* *Interview: Skype and Telephonic* *Experience: 9+ years* Ideally looking for 2 resources with the attached skill set who can start ASAP. The successful candidate will join a high performing agile