Created
April 26, 2017 14:48
-
-
Save dmitry-ilyashevich/0ceb7bec83d9c6a5b7b484db7ad9d54c to your computer and use it in GitHub Desktop.
Revisions
-
dmitry-ilyashevich created this gist
Apr 26, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ class Analytics::AppIdGenerator attr_accessor :current_site DEFAULT_APP_ID = 200 def initialize(current_site = 'fashion', _request_host = nil) self.current_site = current_site end def app_id send("#{current_site.gsub(/\.|\-/, "_")}_app_id") ensure DEFAULT_APP_ID end def fashion_app_id 200 end def sheknows_fashion_app_id 201 end end