sorted 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/sorted.rb +1 -1
- data/sorted.gemspec +1 -1
- data/spec/sorted_spec.rb +5 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/lib/sorted.rb
CHANGED
data/sorted.gemspec
CHANGED
data/spec/sorted_spec.rb
CHANGED
@@ -124,4 +124,9 @@ describe Sorted::ActionView do
|
|
124
124
|
sorter = ActionView::Base.new([], {}, @controller).sorted(:email)
|
125
125
|
sorter.css_class.should == "sorted-asc"
|
126
126
|
end
|
127
|
+
|
128
|
+
it "should allow underscores and and full stops in" do
|
129
|
+
sorter = Sorted::Sorter.new('users.email ASC, users.phone_number DESC, assessments.name ASC', {:sort => "users.email_desc!users.first_name_desc"})
|
130
|
+
sorter.to_sql.should == "users.email DESC, users.first_name DESC, users.phone_number DESC, assessments.name ASC"
|
131
|
+
end
|
127
132
|
end
|