Pony gem allows to easily send good looking and customizable emails, but it doesn't provide a way to include image in a way that it will be displayed in gma...
How to use helper methods in mailer templates? Instead of this "include YourHelper" use this "add_template_helper YourHelper" in YourMailer
To set maximum backup size run this command in shell...
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...
So, you're trying to setup an Ruby 2.3.X-powered Rails app and it complains about openssl? Using a Mac? You're not the first. I've also been there. Let's get this nasty bug out of your way!
Short and working solution to restore deleted git branch
https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale
When you accidentally commit to master/staging and need to move the commit to a feature branch
A quick guide how to include any file, in this case logo to devise messages
The negation of a disjunction is the conjunction of the negations and The negation of a conjunction is the disjunction of the negations.
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Ă
In your code: ```ruby # TODO: fix this ``` In your shell: ```bash % rake notes ``` ```text config/routes.rb: * [ 1] [TODO] fix this ```
Reset devise passwords quickly, even for thousands of users.
Need filters, remote paginations, search field in table, selecting row and much more ... You will find everything in this library
Puppeteer is node library providing high level chromium api. One of it's key features is generating pdf from html using chromium web engine. This is great ad...
This error message seems to be related to network or Bundler issue, but it isn't - newer version of Bundler requires new version of RubyGems, which is not updated by default. Here, you'll see how to fix this issue.
Sometimes you wonder if there's a way to generate PDF without dealing with wk*topdf, puppeteer and other massive serverside tools - and there's one - jsPDF - which will generate a PDF for you in a moment, all client-side!
Rubular is an online tool to check regular expressions written in Ruby.
If you have `if`s nested in this way: ``` if a if b 1 else 2 end else 3 end ``` You can flatten and simplify them into this: ...