Sha256: 9bf1565bc36f48513f1bd58d797dc0500ec15b428f1b7ec2d1c65d39cca89c70
Contents?: true
Size: 732 Bytes
Versions: 1
Compression:
Stored size: 732 Bytes
Contents
# BetterAr BetterAr adds replaces the .all, .first and .count methods for ActiveRecord. Now a single hash can be passed to ActiveRecord::Base.all that contains not only the where values but also other scopes like 'limit' and 'order' User.all(:age => 10, :limit => 5, :offset => 10, :order => :name) is the same as User.where(:age => 10).limit(5).offset(10).order(:name) While this may seem less concise the advantage is being able to dynamically construct the query with a single hash in code. This library completely removes the old .all, .first and .count class methods on ActiveRecord::Base. As these methods were just delegated to the ActiveRecord::Base.scoped they can still be called. Brian Cardarella - 2011
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
better_ar-0.0.3 | README.markdown |