RubyGems
npm
Organizations
Log in
Sign up
RubyGems
order_me
Versions diffs
0.0.2 → 0.0.3
order_me 0.0.2 → 0.0.3
Sign up to get
free
protection for your applications and to get access to all the features.
Files changed (2)
hide
show
data/lib/order_me.rb
+2
-1
metadata
+1
-1
data/lib/order_me.rb
CHANGED
Viewed
@@ -1,6 +1,7 @@
1
1
class ActiveRecord::Base
2
+
2
3
class << self
3
-
attributes
.each do |attr, val|
4
+
column_names
.each do |attr, val|
4
5
define_method "order_me_by_#{attr}" do
5
6
order("#{attr} DESC")
6
7
end
metadata
CHANGED
Viewed
@@ -2,7 +2,7 @@
2
2
name: order_me
3
3
version: !ruby/object:Gem::Version
4
4
prerelease:
5
-
version: 0.0.
2
5
+
version: 0.0.
3
6
6
platform: ruby
7
7
authors:
8
8
- choodur