Custom Inquirer Similar To ActiveSupport's StringInquirer
This is in continuation with the ArrayInquirer post.
Lets see how to implement a Custom Inquirer
for a Rails model
similar to ActiveSupport StringInquirer and ArrayInquirer
.
Extend Core Classes in Rails
In my previous post, I have explained how to extend ActiveRecord::Base
.
In this post, I will explain how to extend core ruby
or rails
classes in rails
.
Extend ActiveRecord::Base
In this post, lets see how to extend ActiveRecord::Base
class to add custom methods.
Javascript Inheritance and the prototype chain
It is often required to extend existing object or class to add new methods or override existing methods. Almost All the Object Oriented Programming Languages provide this feature using inheritance.