Self-implementation of Rails framework methods and classes