#86 ✓resolved
Vidmantas

Doesn't work without config.time_zone

Reported by Vidmantas | May 5th, 2009 @ 08:36 AM

Hi, Ben,

I ran into the following issue this afternoon:

I have application where config.time_zone is not set (because it's not needed) and I've tried to search including one datetime field, to be exact:


 <%= mailout.text_field :start_sending_at_at_least %>

And then this error occured:

You have a nil object when you didn't expect it! The error occurred while evaluating nil.utc_offset

Backtrace:

/usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/condition/base.rb:159:in type_cast_value' /usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/condition/base.rb:102:invalue' /usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/condition/base.rb:91:in sanitize' /usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/conditions/base.rb:142:insanitize' /usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/conditions/base.rb:141:in each' /usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/conditions/base.rb:141:insanitize' /usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/search/conditions.rb:46:in sanitize_without_ordering' /usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/search/ordering.rb:155:insanitize' /usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/search/searching.rb:17:in all' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:2148:inwith_scope_without_searchlogic' /usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/active_record/base.rb:47:in with_scope' /usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/search/searching.rb:16:insend' /usr/lib/ruby/gems/1.8/gems/searchlogic-1.6.6/lib/searchlogic/search/searching.rb:16:in all' /essdot/projects/crm/app/controllers/email_controller.rb:66:inlist'

This appears only when I fill in date field. When I set config.time_zone, everything works smoothly.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Provides common named scopes and object based searching.

People watching this ticket

Tags

Pages