Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-15 Thread fugee ohu
The error's caused by the routine ensure_canonical_url If I comment it out it works blog_post.rb: def to_param "#{id}-#{title.parameterize}" end blog_posts_controller.rb: def set_blog_post @blog_post = BlogPost.find(params[:id]) end def ensure_canonical_url

Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-15 Thread Ariel Juodziukynas
I insist, show your code, show the complete error stacktrace, show the log. I can imagine what you are trying to do and from the (little) code you show it should work so something else is messing things up but you are showing barely any relevant code. El miƩ., 15 ene. 2020 a las 22:37, fugee ohu

Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-15 Thread fugee ohu
On Wednesday, January 15, 2020 at 8:26:45 PM UTC-5, Ariel Juodziukynas wrote: > > find method doesn't care about the to_param method, it just takes the > parameter you use, I guess it calls "to_i" and uses that integer to query > the id column > > Why don't you show your code, the stacktrace,

Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-15 Thread Ariel Juodziukynas
find method doesn't care about the to_param method, it just takes the parameter you use, I guess it calls "to_i" and uses that integer to query the id column Why don't you show your code, the stacktrace, the logs or anything? I suggest you read something like stackoverflow's guidelines on how to

[Rails] Hiring for Top Companies in Bay Area

2020-01-15 Thread Aamil Saiyed
Ruby on Rails Developers to Engineering Managers and Directors. Direct hire opportunities only. Location: San Francisco Compensation: Open to Market + Equity My all clients are backed by Heavy VC findings upto 8 million and they have a valuation of 1 Billion. Get your dog to office. Enjoy

Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-15 Thread fugee ohu
On Wednesday, January 15, 2020 at 3:07:00 PM UTC-5, Ariel Juodziukynas wrote: > > From the docs: > https://apidock.com/rails/v6.0.0/ActiveRecord/FinderMethods/find > > Person .find > ("31-sarah") # >

Re: [Rails] [JOBS] Ruby on Rails developer - Remote OK

2020-01-15 Thread Sampson Crowley
This really sounds like an interesting position that ticks all of my boxes and vice versa. Feel free to contact me at any time to discuss needs and expectations. On Sun, Jan 12, 2020 at 10:55 AM Siva Gopalreddy < sivagopalreddy...@gmail.com> wrote: > Hi , > I am interested for this position. > >

Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-15 Thread Ariel Juodziukynas
>From the docs: https://apidock.com/rails/v6.0.0/ActiveRecord/FinderMethods/find Person .find ("31-sarah") # returns the object for ID = 31 In your case, if you are using find, it should search for

[Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-15 Thread fugee ohu
Doesn't work for me in rails 6 Parameters: {"id"=>"18-test-title"} ActionController::ActionControllerError (Cannot redirect to nil!): Ne -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop