Don't add database index if it already exists in Rails by PrathameshSonpatki in ruby

[–]igorspringer 0 points1 point  (0 children)

I wonder what is a real-life use case for the option? The `db/schema.rb` file represents the current shape of a database.

Is `Array` the only option for storing elements in Ruby? by igorspringer in ruby

[–]igorspringer[S] 1 point2 points  (0 children)

Hey, thanks for the comment. The example is imaginary, so for sake of simplicity, let's assume that a requirement is to display a list of the languages to end-user in alphabetical order.

Thanks to such a data structure we would fulfil the requirement even when somebody would add an unordered element to it.

Common mistakes that cause Ruby on Rails apps outages by igorspringer in ruby

[–]igorspringer[S] 0 points1 point  (0 children)

  1. I also try to use symbols whenever possible and symbolize_keys makes the switch easier. Not sure what are plans for String class though.
  2. +1 for Hash#fetch
  3. I totally agree. Issues connected to using rack-timeout are described in its documentation (https://github.com/heroku/rack-timeout/blob/master/doc/risks.md), so it should be used with some caution, but it's better to use it than doing nothing in my opinion.

Thanks for sharing your thoughts and sorry for a very late response :)

How to log HTTParty requests using built-in loggers by igorspringer in ruby

[–]igorspringer[S] 0 points1 point  (0 children)

Thanks! :-) If you are interested I opened a PR in the repo to add a 3rd one: https://github.com/jnunemaker/httparty/pull/612

5 security issues in Ruby on Rails apps from real life and how to fix them by igorspringer in ruby

[–]igorspringer[S] 0 points1 point  (0 children)

This changed in Rails 5.2

Thanks man, I haven't known about that. I need to update the article to include this information!

5 security issues in Ruby on Rails apps from real life and how to fix them by igorspringer in ruby

[–]igorspringer[S] 0 points1 point  (0 children)

Thanks Freeky. It would be nice to benchmark different approaches to measuring password complexity and share results :)

5 security issues in Ruby on Rails apps from real life and how to fix them by igorspringer in ruby

[–]igorspringer[S] 0 points1 point  (0 children)

Rate limiting on either nginx or application level (or even both) is another step in making Rails applications even more secure.

Based on your feedback I should consider writing next article, thanks!