Archive | October 2013

You are browsing the site archives by date.

Simple Metaprogram to Dynamically inject Class Methods and Instance Methods from module

module DummyModule module ClassMethods def find_by_ranks() puts “Class Method Executed Successfully !!!” end end module InstanceMethods def ranks() puts “instance method Executed Successfully !!!” end end def self.included(base) base.send :include, InstanceMethods base.send :extend, ClassMethods end end class Test include DummyModule end t = t.ranks #output : instance method Executed Successfully !!! Test.find_by_ranks #output : […]

Create a new Rails App Using Specific Version

As we now Rails Community is a very active commnity and Number of rails version are get released so here is a  short command I found to create a rails application by using Specific version $ rails _3.2.13_ new appname