Activerecord patterns

Related to issue #63