Skip to content

Commit

Permalink
simplified UTM path generation, avoids strange error with rails 3.1 i…
Browse files Browse the repository at this point in the history
…n development
  • Loading branch information
Michael Reinsch committed Oct 4, 2011
1 parent 8bcd299 commit 54fe754
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 52 deletions.
93 changes: 48 additions & 45 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,82 +1,85 @@
PATH
remote: .
specs:
garails (0.0.6)
garails (0.1.1)
gabbara (~> 0.0.5)

GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.3)
actionpack (= 3.0.3)
mail (~> 2.2.9)
actionpack (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
actionmailer (3.0.10)
actionpack (= 3.0.10)
mail (~> 2.2.19)
actionpack (3.0.10)
activemodel (= 3.0.10)
activesupport (= 3.0.10)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.4)
i18n (~> 0.5.0)
rack (~> 1.2.1)
rack-mount (~> 0.6.13)
rack-test (~> 0.5.6)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
activemodel (3.0.3)
activesupport (= 3.0.3)
activemodel (3.0.10)
activesupport (= 3.0.10)
builder (~> 2.1.2)
i18n (~> 0.4)
activerecord (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
arel (~> 2.0.2)
i18n (~> 0.5.0)
activerecord (3.0.10)
activemodel (= 3.0.10)
activesupport (= 3.0.10)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
activeresource (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
activesupport (3.0.3)
addressable (2.2.5)
arel (2.0.6)
activeresource (3.0.10)
activemodel (= 3.0.10)
activesupport (= 3.0.10)
activesupport (3.0.10)
addressable (2.2.6)
arel (2.0.10)
builder (2.1.2)
crack (0.1.8)
crack (0.3.1)
erubis (2.6.6)
abstract (>= 1.0.0)
flexmock (0.9.0)
gabbara (0.0.5)
gabbara (0.0.6)
activesupport
i18n (0.5.0)
mail (2.2.12)
mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
polyglot (0.3.2)
rack (1.2.4)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.6)
rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.3)
actionmailer (= 3.0.3)
actionpack (= 3.0.3)
activerecord (= 3.0.3)
activeresource (= 3.0.3)
activesupport (= 3.0.3)
rails (3.0.10)
actionmailer (= 3.0.10)
actionpack (= 3.0.10)
activerecord (= 3.0.10)
activeresource (= 3.0.10)
activesupport (= 3.0.10)
bundler (~> 1.0)
railties (= 3.0.3)
railties (3.0.3)
actionpack (= 3.0.3)
activesupport (= 3.0.3)
railties (= 3.0.10)
railties (3.0.10)
actionpack (= 3.0.10)
activesupport (= 3.0.10)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.4)
rake (0.8.7)
rake (0.9.2)
rdoc (3.9.4)
shoulda (2.11.3)
thor (0.14.6)
treetop (1.4.9)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.23)
webmock (1.6.2)
addressable (>= 2.2.2)
tzinfo (0.3.30)
webmock (1.7.6)
addressable (~> 2.2, > 2.2.5)
crack (>= 0.1.7)

PLATFORMS
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'rake/testtask'
require 'rake/rdoctask'
require 'rdoc/task'
require 'bundler'
Bundler::GemHelper.install_tasks

Expand Down
9 changes: 4 additions & 5 deletions app/helpers/garails/mobile_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ def utm_tag

def utm_path
referer = request.env['HTTP_REFERER']
params = {
url_for :controller => 'garails/google_analytics',
:action => 'utm',
:format => :gif,
:utmn => rand(0x7fffffff).to_s,
:utmr => referer.blank? ? "-" : referer,
:utmp => request.env['REQUEST_URI'],
:guid => "ON",
:format => :gif
}
super(params)
:guid => "ON"
end

end
2 changes: 1 addition & 1 deletion lib/garails/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Garails
VERSION = '0.1.0'
VERSION = '0.1.1'
end

0 comments on commit 54fe754

Please sign in to comment.