Posts tagged under "rails"

Using Pundit for authorization in Rails - recipes and best practices

By Akshay Sasidharan on July 29, 2018
Make better authorization for your application.
Tagged under: rails

APIs supporting snake_case and camelCase with Rails

By Yuva on August 25, 2016
Supporting API conventions for client like reactjs can be quite tricky. This post talks about approach to make APIs accessible using snakecase or camelCase.
Tagged under: rails, api

Working with Rails, Webpack and Heroku

By Kashyap on April 8, 2016
Deploying a Rails app with Webpack asset management on Heroku can be tricky. However, Heroku provides lifecycle hooks on its NodeJs buildpack that will help make this easier.
Tagged under: rails

New in ActiveRecord: #in_batches

By Kashyap on December 23, 2015
Rails 5 has a new feature added to ActiveRecord that makes working with batch data much more efficient. The `Model.in_batches` function passes a batch of records wrapped inside an ActiveRecord collection.
Tagged under: rails

Cake walk: Using bower with rails

By Yuva on December 10, 2014
Traditionally, Rails 3.x and above come with Sprockets and asset management functions. However, using a JavaScript or CSS library with Sprockets means we'd have to roll them into gems with a specific directory heirarchy. Instead, we can leverage Bower to handle that for us.
Tagged under: rails, assets, bower, sprockets

Form object validations in Rails 4

By Yuva on March 22, 2014
Interacting with complex web forms tends to become hairy pretty quickly. Using Form or Service objects to abstract out the complexity can help wrangle complexity. This post talks about how we use them to make code simpler.
Tagged under: rails, rspec

Random Ruby tips from trenches #1

By Hemant on January 7, 2014
Tagged under: ruby, rails, tips

Setting up Emacs as Ruby development environment on OSX

By Hemant on October 17, 2013
Tagged under: emacs, osx, ruby, rails

How rails reloads your source code in development mode?

By Yuva on October 3, 2013
In this post, I will talk about how Rails 3.x reloads code in the development environment.
Tagged under: rails, code-walkthrough

Isolate Namespace in Rails Engines - A hack in itself

By Yuva on September 22, 2013

Setting up Source Maps for CoffeeScript in Rails

By Amitava on September 5, 2013
Tagged under: coffeescript, rails

Redefine rake routes to add your own custom tag in Rails

By Deepak on July 12, 2013
Tagged under: rake, rails, tips

All you need to know about writing a mountable Rails Gem with rspec

By Yuva on May 30, 2013
Tagged under: gem, mountable, rspec, rails

Profile Ruby 2.0 apps using DTrace - part 2

By Hemant on May 27, 2013
Ruby 2.0 and above has in-built support for DTrace hooks. This lets us profile Ruby programs. In this post, I'll go into the details of the features of DTrace.
Tagged under: ruby, dtrace, profiling, rails

Rails Autoload Path

By Yuva on May 1, 2013
Tagged under: rails

Profile Ruby 2.0 apps using DTrace - Part 1

By Hemant on April 16, 2013
Ruby 2.0 and above has in-built support for DTrace hooks. This lets us profile Ruby programs. In this post, I'll introduce DTrace and how to add DTrace probes to a Ruby program.
Tagged under: ruby, dtrace, profiling, rails

Using Backbone JS in multipage application

By Amitava on April 6, 2013
This post talks about using the Backbone library with a Rails backend, and goes through some challenges and gotchas encountered during the process.
Tagged under: rails, backbone

Poor man's rspec mode for emacs

By Hemant on March 28, 2013
Tagged under: emacs, rspec, rails

Bundler: Cleanup old unused gems

By Yuva on March 27, 2013
Tagged under: bundler, rails, ruby

The kitchen sink libraries

By Hemant on May 8, 2012
The problem with kitchen sink libraries is feature creep. Sometimes all we need are small libraries that are easily readable.
Tagged under: ruby, rails, gems