Chartkick: To Make Easy Charts and Graphs with Rails.

Now a days in many website we use chart to show the statistics for the site and there are many plugins and gems available for it. But I liked one gem Chartkick that I used in one of our application to create column chart to show weekly, yearly and From date - ToDate range statistics of site. I found it very useful and easy to use. You will get details about chartkick here. To use chartkick you have to just follow simple step and you are ready to create beautiful Javascript charts with one line of Ruby. Chartkick can work

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.