So Pat an update:

if I set :delta => true (this doing normal delta indexing) everything 
works. But for some reason I am doing something wrong in Sidekiq and I just 
can't find it - it's been 12 hours give or take and I'm not sure I'll be 
able to figure this one out on my own! I'll try a couple of other options 
but at some point, you just run out of ideas !

Also the guilty line seems to be: 

@restaurant = Restaurant.find_or_create_by_google_id(venue[:google_id], 
final_restaurant_attributes(venue))

at that point, this is what happens in the db; I suspect it has something 
to do with :delta but I'm out of ideas about what it could be:

Restaurant Load (0.6ms)  SELECT "restaurants".* FROM "restaurants" WHERE 
"restaurants"."google_id" = '7098f3cdf8af60d2be43bf6b534fb49e94fc7ebf' 
LIMIT 1
   (0.3ms)  BEGIN
  Restaurant Exists (0.7ms)  SELECT 1 AS one FROM "restaurants" WHERE 
"restaurants"."google_id" = '7098f3cdf8af60d2be43bf6b534fb49e94fc7ebf' 
LIMIT 1
   (0.3ms)  ROLLBACK



On Thursday, April 18, 2013 3:31:18 AM UTC-7, [email protected] wrote:
>
> Hi Pat,
>
> I implemented TS delayed_delta  on my app and I get a strange error 
> message when I load a view. The view loads a restaurant summary.
>
> Here is the message: 
>
> undefined method `toggle' for nil:NilClass
>
> Extracted source (around line *#1*):
>
> 1: <% set_google_restaurant_values(result) %>2: <li 
> id="restaurant_summary">3: <div id = "restaurant_summary_wrapper">4: <div 
> id="restaurant_summary_left">
>
> Trace of template inclusion: 
> app/views/restaurants/_google_restaurants.html.erb, 
> app/views/restaurants/google_search.js.erb
>
> Rails.root: /home/lgorse/www/curiousbear
> Application Trace | Framework Trace | Full Trace
>
> app/helpers/restaurants_helper.rb:106:in 
> `set_google_restaurant_values'app/views/restaurants/_google_restaurant_summary.html.erb:1:in
>  
> `_app_views_restaurants__google_restaurant_summary_html_erb___1466256548253147453_43999960'app/views/restaurants/_google_restaurants.html.erb:4:in
>  
> `_app_views_restaurants__google_restaurants_html_erb__2975153352808883957_43673500'app/views/restaurants/google_search.js.erb:2:in
>  
> `_app_views_restaurants_google_search_js_erb__2134691260687145231_39594340'app/controllers/restaurants_controller.rb:15:in
>  `index'
>
>
>
> And here is my code - please ask if you need more:
>
>
> def set_google_restaurant_values(result)
> venue = set_attr_from_google(result)
> @encoded_venue = Base64.urlsafe_encode64(URI.encode(venue.to_json))
>  @venue_json = {"name" => venue[:name]}.to_json
>
> @restaurant = Restaurant.find_or_create_by_google_id(venue[:google_id], 
> final_restaurant_attributes(venue))
>
> @parsed_address = split_formatted_address(venue[:formatted_address].to_s)
>  end
>
> I think this has to do with the 'toggle' button in your thinking_sphinx.rb 
> class but I have no idea how to pass my instance, or why it's not passing.
>
> The :delta attribute is not null and true by default in the model.
>
> Talk to you soon Pat - fingers crossed you can help
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to