The Basics of Caching and Cache Digests

Apr 6, 2013

Recently posted a blog about basics of caching and cache digests on Rubysource. If you are going to apply caching in your app this blog will help you. You can find blog on RubySource


Rails 4 Quick Look Strong Parameters

Dec 9, 2012

Strong Parameters is a new feature coming with Rails4. Its about Mass-assignment protection in controller instead of model. If you are keen to know more about it- read it on RubySource.


Polymorphic Association with has_many :through

Jun 7, 2012

Hi Folks,

In Rails we have Ploymorphic Association whenever we need to connect one model to more than one model. I had a situation where i need polymorphic association with has_many :through Here I am showing an simple example of polymorphic association with has_many :through


Enhance Rails Models

May 5, 2012

In Rails Models play a important part in our Rails App.We should keep are model pretty,not having dirty code Here i am just reminding you some basic points to refactor a model.


Background Processing Using Rails Runner

May 3, 2012

Rails comes with a built-in tool for running tasks independent of the web cycle. The rails runner command simply loads the default Rails environment and then executes some specified Ruby code.


Rails 3 Responders

May 1, 2012

So we have a problem here in Controllers. As our application grows our controllers grows. We will be in trouble when we have alternative formats in our controllers like JSON, XML.

You might need to respond both in JSON and XML or might be only JSON in your controller.


OAuth with OmniAuth and Github

Apr 22, 2012

If you want to authenticate your user in your app with Github  use omniauth-github strategy for that. Here I am describing how you can do that very quickly. OmniAuth provides list of  strategies to use many OAuth for your application. Here is the  List of Strategies.


Basic Difference between Proc and Lambda in Ruby

Feb 19, 2012

Proc => Proc objects are blocks of code that have been bound to a set of local variables. Once bound, the code may be called in different contexts and still access those variables.


Proc call in ruby1.9.3

Feb 18, 2012

Call a proc in different ways

my_proc = Proc.new do|name|
  "this is #{name}"
end


Asset Pipeline with Rails 3.1

Nov 29, 2011

This is the new very interesting and useful feature in Rails 3.1.

Asset Pipeline
  • The asset pipeline provides a framework to concatenate and minify or compress JavaScript and CSS assets.
  • It allows you to write these assets in other languages like CoffeeScript, Sass and ERB