The Basics of Caching and Cache Digests
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
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
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
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
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
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
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
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
Call a proc in different ways
my_proc = Proc.new do|name|
"this is #{name}"
end
Asset Pipeline with Rails 3.1
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


