Home > relation_scope

relation_scope

Relation_scope is a project mainly written in Ruby, based on the MIT license.

用name_scope模拟Rails 3 ActiveRecord::Relation一些实用的东西

== RelationScope

This plugin just for rails version 2.3.x with named scope module. Include name scope methods: where, joins, includes, selects, order, limit, offset, group, having

== Installation

gem install relation_scope

git clone git://github.com/liangwenke/relation_scope.git

== Usage

User.order('created_at DESC').where(:name => 'test').limit(2)
User.joins(:roles).selects('distinct users.*')

== License

Copyright (c) 2011 [[email protected]], released under the MIT license

Previous:Superresolution