Hi guys. I'm experiencing some strange behaviour in my Rails app. I
have a constant, and two class methods:

#----------#
COORDINATES_NOT_NULL_SQL =
  'latitude IS NOT NULL and longitude IS NOT NULL'

def self.sql_for_non_null_coordinates
  COORDINATES_NOT_NULL_SQL
end

def self.filtered_properties(params)
  conditions_string = self.sql_for_non_null_coordinates
  ...8<...
  conditions_string << ' AND ' << filtered[:sql]
  ...8<...
end
#----------#

If I call #filtered_properties multiple times in a row, the value that
#sql_for_non_null_coordinates returns changes:
http://pastie.org/299037

This line is causing the change:
  conditions_string = self.sql_for_non_null_coordinates
But why? And is it possible to prevent this behaviour?

Thanks,
Nick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to