Re: [Rails] can CSS do the following?

2017-02-04 Thread tamouse pontiki
On Fri, Feb 3, 2017 at 10:28 PM Joe Guerra wrote: > Yes it can, I answered my own question. I found a nice gallery layout, > much better than the layout I had been using. > > On Fri, Feb 3, 2017 at 10:57 PM, Joe Guerra wrote: > > Just curious if CSS styling can take a record that is displayed i

Re: [Rails] how do you pass paramters from a button in rails?

2017-02-04 Thread Scott Eisenberg
You can put the parameters as an argument to a path like so: =link_to "Add Special", add_special_path(work_day: @date), class: 'uk-button buffer-left-twice’ which will make a url like http://xxx.com/time/add_special?work_day=2017-02-04 Or i

Re: [Rails] how do you pass paramters from a button in rails?

2017-02-04 Thread Hassan Schroeder
On Sat, Feb 4, 2017 at 12:13 AM, Greg Navis wrote: > button_to generates a form with a button. I'm not sure there's a way to add > custom hidden fields to the form. One way around the problem would be to One way around the "problem" would be to read the documentation for that method, which includ

Re: [Rails] how do you pass paramters from a button in rails?

2017-02-04 Thread nanaya
Hi, On Sat, Feb 4, 2017, at 12:52, Joe Guerra wrote: > > > I have the following code in my show.html.erb file, it calls the right > method (or path). > > I am unsure how to pass variables from my product show.html.etb to my > actual method... > > > > <%= button_to 'Add to Cart', add_to_ca

Re: [Rails] how do you pass paramters from a button in rails?

2017-02-04 Thread Greg Navis
button_to generates a form with a button. I'm not sure there's a way to add custom hidden fields to the form. One way around the problem would be to create the form manually, add the hidden input (with product ID), a number input with quantity and the submit button. Would this work for you? -- Y

[Rails] Devise force logout for some users from Rails App

2017-02-04 Thread Errfan Wadia
Is it possible to force logout for SOME of the users through Devise. In my setup, I am using rails 4.1.15 with Devise 1.5.4. Sessions are persisted in db and there is no direct mapping with user ids. Is there a Devise way to logout against some of the users NOT ALL. I tried resetting password