RubyGems
npm
Organizations
Log in
Sign up
RubyGems
order_me
Versions diffs
0.0.3 → 0.0.4
order_me 0.0.3 → 0.0.4
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
+1
-2
metadata
+1
-1
data/lib/order_me.rb
CHANGED
Viewed
@@ -1,7 +1,6 @@
1
1
class ActiveRecord::Base
2
-
3
2
class << self
4
-
column_names.each do |attr, val|
3
+
self.
column_names.each do |attr, val|
5
4
define_method "order_me_by_#{attr}" do
6
5
order("#{attr} DESC")
7
6
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.
3
5
+
version: 0.0.
4
6
6
platform: ruby
7
7
authors:
8
8
- choodur