News for hackers. Stuff that matters.
Re:Is Rails still relevant in 2018? by petepete on Tuesday August 28, 2018 @04:24AM (#17857342)
> I recently wanted to remove IP logging in a RoR application but I was unable to find the relevant code anywhere, the only hits that grep spat out where the migrations and I couldn't figure out how to rip all that out.

Usually you'd just create a custom logger[0] and tell Rails to use it[1]

[0] https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger....

[1] https://guides.rubyonrails.org/configuring.html#rails-genera...

Re:Is Rails still relevant in 2018? by zaarn on Tuesday August 28, 2018 @05:02AM (#17857470)
It wasn't putting the IP in the log but in the database and along the username and session data, there is an open ticket about that behavior too. Since I'm in Europe/Germany, this kind of data storage would have been a no-go even before the GDPR.
Re:Is Rails still relevant in 2018? by bshimmin on Tuesday August 28, 2018 @07:28AM (#17857947)
It sounds like you had to remove the Trackable module from Devise - which would indeed be one line of code to change in a Rails app, but quite hard to figure out if you didn't know. However, Devise is a third party gem which is often used with Rails but isn't actually a part of Rails, so can you really blame Rails for this? (And, unless it's for a very specific string, is grepping a codebase that you have no understanding of ever really a successful strategy?)
Re:Is Rails still relevant in 2018? by zaarn on Tuesday August 28, 2018 @07:32AM (#17857973)
I blame the coding practises of the rails devs, not the gem itself.

Grepping can be a successful strategy, esp. when you know what you are looking for and you can search the database column in the code

Re:Is Rails still relevant in 2018? by bshimmin on Tuesday August 28, 2018 @07:47AM (#17858052)
I can't in all honesty understand why you wouldn't just Google "rails login current_sign_in_ip", the top three hits for which would probably all put you on the right track. I would say grepping through the code of third-party libraries would be something I'd do only in desperation when working in an unfamiliar codebase. But hey, each to their own!
Re:Is Rails still relevant in 2018? by zaarn on Tuesday August 28, 2018 @08:10AM (#17858160)
Oh, don't worry, I did Google that. Just didn't work because none of the results helped or put me on the right track or were just plain too confused to be understandable.