left outer join in Rails 5

In Rails 5 Active Record provide two finder methods to specify JOIN on associated tables, joins left_outer_joins Suppose in our application we have Article and Comment. Here comments belong to an article, while article have many comments. Now if we want to show list of all articles along with number of comments, we need join to Article and Comment by left_outer_join. In rails 4.x, Active Record does not have support for outer joins. So we need to add SQL for left outer join manually. articles = Article.join('LEFT OUTER JOIN "comments" ON "

Wicked PDF : PDF generation plugin

Wicked PDF uses shell utility wkhtmltopdf to serve a PDF file to a user from HTML. In other words, you simply write an HTML view as you would normally, then wicked PDF takes care of other stuff. wicked PDF works on Ruby versions 1.8.7 through 2.3; Rails 2 through 5.0 Installation: To use Wicked PDF, first install wkhtmltopdf. Alternatively, you could use the wkhtmltopdf-binary gem by including it in your Gemfile. Add following gems to your Gemfile and run bundle install. gem 'wicked_pdf' gem 'wkhtmltopdf-binary' Register the PDF mime type in config/initializers/mime_types.