Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Release v1.2.2

  • Loading branch information...
commit 20fe2a8cef179f8f698d10dabb9eb6d42f251608 1 parent 00921cd
Ben Johnson authored
3  CHANGELOG.rdoc
View
@@ -1,4 +1,4 @@
-== 1.2.2 released 2008-09-27
+== 1.2.2 released 2008-09-29
* Fixed bug when reverse engineering order to order_by, assumed ASC and DESC would always be present when they are not.
* False is a meaningful value for some conditions, and false.blank? == true. So instead of using value.blank? to ignore conditions we use meaningless?(value), which returns false if it is false.
@@ -6,6 +6,7 @@
* Fixed bug when writing conditions on associations via a hash with string keys
* Added Config.remove_duplicates to turn off the "automatic" removing of duplicates if desired.
* Updated searchgasm_state helper to insert the entire state all at once.
+* Added CSS class "ordering" to order_by_link if the search is being ordered by that.
== 1.2.1 released 2008-09-25
9 Manifest
View
@@ -3,22 +3,26 @@ examples/README.rdoc
init.rb
lib/searchgasm/active_record/associations.rb
lib/searchgasm/active_record/base.rb
+lib/searchgasm/active_record/connection_adapters/mysql_adapter.rb
+lib/searchgasm/active_record/connection_adapters/postgresql_adapter.rb
+lib/searchgasm/active_record/connection_adapters/sqlite_adapter.rb
lib/searchgasm/condition/base.rb
lib/searchgasm/condition/begins_with.rb
+lib/searchgasm/condition/blank.rb
lib/searchgasm/condition/child_of.rb
lib/searchgasm/condition/contains.rb
lib/searchgasm/condition/descendant_of.rb
lib/searchgasm/condition/does_not_equal.rb
+lib/searchgasm/condition/during_evening.rb
lib/searchgasm/condition/ends_with.rb
lib/searchgasm/condition/equals.rb
lib/searchgasm/condition/greater_than.rb
lib/searchgasm/condition/greater_than_or_equal_to.rb
lib/searchgasm/condition/inclusive_descendant_of.rb
-lib/searchgasm/condition/is_blank.rb
-lib/searchgasm/condition/is_nil.rb
lib/searchgasm/condition/keywords.rb
lib/searchgasm/condition/less_than.rb
lib/searchgasm/condition/less_than_or_equal_to.rb
+lib/searchgasm/condition/nil.rb
lib/searchgasm/condition/sibling_of.rb
lib/searchgasm/condition/tree.rb
lib/searchgasm/conditions/base.rb
@@ -66,3 +70,4 @@ test/test_search_conditions.rb
test/test_search_ordering.rb
test/test_search_pagination.rb
test/test_search_protection.rb
+TODO.rdoc
4 lib/searchgasm/helpers/control_types/link.rb
View
@@ -239,10 +239,12 @@ def page_link(page, options = {})
private
def add_order_by_link_defaults!(order_by, options = {})
add_searchgasm_control_defaults!(:order_by, options)
+ ordering_by_this = searchgasm_ordering_by?(order_by, options)
+ searchgasm_add_class!(options[:html], "ordering") if ordering_by_this
options[:text] ||= determine_order_by_text(order_by)
options[:asc_indicator] ||= Config.asc_indicator
options[:desc_indicator] ||= Config.desc_indicator
- options[:text] += options[:search_obj].desc? ? options[:desc_indicator] : options[:asc_indicator] if searchgasm_ordering_by?(order_by, options)
+ options[:text] += options[:search_obj].desc? ? options[:desc_indicator] : options[:asc_indicator] if ordering_by_this
options[:url] = searchgasm_params(options.merge(:search_params => {:order_by => order_by}))
options
end
Please sign in to comment.
Something went wrong with that request. Please try again.