Manual: 1. Go to https://dbdiagram.io/d 2. Click *import* and choose *Import from Rails (schema.rb)* 3. Paste schema.rb content 4. voilĂ
To use Brakeman, the only thing is to install the gem: ``` $ gem install brakeman ``` and then run the single command in Rails application's root dir...
Rails migration decimal precision scale explained quasi visually ``` 123.45678912345 <- scale -> <- precision -> ```
I encountered a problem when dropping a production database. Here's the solution
How to use helper methods in mailer templates? Instead of this "include YourHelper" use this "add_template_helper YourHelper" in YourMailer
In some cases, Ruby uses higher precision to represent time than the DB. When we compare a timestamp before and after saving to the DB it might not be equal.
```ruby Model .where("TSRANGE(?, ?, '()') && TSRANGE(starts_at, ends_at, '()')", starts_at, ends_at) .where.not(id: record_id) .exists? ``` Bot...
When to use let, let! and before in RSpec.
This guy makes his shared examples easier to understand. Overpaid consultants hate him!
You can define external urls in routes.rb instead of creating helpers manually
https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale
When you try to compile ES6 syntax with Uglifier gem initialized you get this error: ``` Uglifier::Error: (...) To use ES6 syntax, harmony mode must be e...
Shell script that will start a tmux session with Rails console and server in side panes