Re: [Rails] Leave a specific row on top of sorted results

2018-06-04 Thread fugee ohu
On Monday, June 4, 2018 at 8:31:35 AM UTC-4, Colin Law wrote: > > On 4 June 2018 at 12:10, fugee ohu > > wrote: > >> How do I leave a specific row on top of sorted results I'm displaying >> news stories and I want the top story to stay on top for as long as it's >> the top story >> > > I can't

Re: [Rails] how do forms pass the id to the controller in normal basic scaffolding

2018-06-04 Thread Walter Lee Davis
Did you look in the params hash that is sent from your form when you submit it? What's the very last element in the params (usually, and in a scaffolded demo, always)? Note: I am speaking of the params you would get in an update (PATCH), not a create (POST), as you asked specifically about the i

Re: [Rails] Leave a specific row on top of sorted results

2018-06-04 Thread Colin Law
On 4 June 2018 at 12:10, fugee ohu wrote: > How do I leave a specific row on top of sorted results I'm displaying news > stories and I want the top story to stay on top for as long as it's the top > story > I can't understand how you have to keep asking such basic questions. Isn't it obvious?

[Rails] Re: How to handle the "\b" (the backspace character) in your Rails application?

2018-06-04 Thread Paul McMahon
On Monday, June 4, 2018 at 7:30:31 PM UTC+9, fugee ohu wrote: > > You don't want to accomodate them in allowing them to input the special > character do you? > There's no reason I can see of in our app (or almost any Rails app) you'd want to allow the "\b" character as user input. -- You rece

[Rails] Leave a specific row on top of sorted results

2018-06-04 Thread fugee ohu
How do I leave a specific row on top of sorted results I'm displaying news stories and I want the top story to stay on top for as long as it's the top story -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group

[Rails] Re: How to handle the "\b" (the backspace character) in your Rails application?

2018-06-04 Thread fugee ohu
On Monday, June 4, 2018 at 5:56:59 AM UTC-4, Paul McMahon wrote: > > Somehow, users sometimes enter "\b" (the backspace character) into our web > forms.For the sake of example, say they enter in "Foo\bbar" into a form. > > This then gets saved to the database as is "Foo\bbar". When I later > in

[Rails] Re: How to handle the "\b" (the backspace character) in your Rails application?

2018-06-04 Thread fugee ohu
On Monday, June 4, 2018 at 5:56:59 AM UTC-4, Paul McMahon wrote: > > Somehow, users sometimes enter "\b" (the backspace character) into our web > forms.For the sake of example, say they enter in "Foo\bbar" into a form. > > This then gets saved to the database as is "Foo\bbar". When I later > in

[Rails] How to handle the "\b" (the backspace character) in your Rails application?

2018-06-04 Thread Paul McMahon
Somehow, users sometimes enter "\b" (the backspace character) into our web forms.For the sake of example, say they enter in "Foo\bbar" into a form. This then gets saved to the database as is "Foo\bbar". When I later include this in my html, it gets added as is (so my html contains "Foo\bbar").

[Rails] devise-i18n

2018-06-04 Thread fugee ohu
If i have this gem installed and also rails-i18n why do i still get missing translations errors from devise? -- 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

[Rails] devise-i18n rubygem

2018-06-04 Thread fugee ohu
The docs say : If, for whatever reason, you want to change devise-i18n's translations, you can generate the locale file into your project with rails g devise:i18n:locale it which will generate config/locales/devise.views.it.yml. If you're doing this to add a missing translation or to improve an

[Rails] how do forms pass the id to the controller in normal basic scaffolding

2018-06-04 Thread fugee ohu
How do forms pass the id to the controller in normal basic scaffolding? There's no id field in the form, there's no magic that passes the form's container object to the controller, rather every parameter is explicity provided in input fields of the form, except the id, so how does the id get pa