Skip to content

Commit

Permalink
Updated impressionist, added browser
Browse files Browse the repository at this point in the history
  • Loading branch information
scottcmerritt committed Mar 10, 2022
1 parent 9a8b566 commit ba10934
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/impressionist_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ def impressionist(obj,message=nil,opts={}, extra={},lang=I18n.locale,browser_inf
if should_count_impression?(opts)
if obj.respond_to?("impressionable?")
if unique_instance?(obj, opts[:unique])
browser_info = main_app.browser.to_s #main_app.respond_to?(:browser) && main_app.browser.respond_to?(:to_s) ? browser.to_s : nil
browser_info = browser.to_s #respond_to?(:browser) && browser.respond_to?(:to_s) ? browser.to_s : nil

custom_params = associative_create_statement({:message => message})
custom_params[:params] = custom_params[:params].merge(extra) #.merge({lang:lang})
obj.impressions.create(custom_params.merge(:lang => lang,:browser=>browser_info))
obj.impressions.create(custom_params.merge({:lang => lang,:browser=>browser_info}))
end
else
# we could create an impression anyway. for classes, too. why not?
Expand Down

0 comments on commit ba10934

Please sign in to comment.