Permalink
Browse files

rename to set_cookie

  • Loading branch information...
1 parent 7136fd7 commit 5a4b36c1f383bc596f930bdca86c8e0a222fadac @jacquescrocker committed Jun 8, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/aarrr/middleware.rb
  2. +1 −1 lib/aarrr/session.rb
  3. +1 −1 spec/functional/aarrr/session_spec.rb
View
@@ -12,7 +12,7 @@ def call(env)
# sets a tracking cookie on the response
response = Rack::Response.new body, status, headers
- aarrr_session.save(response)
+ aarrr_session.set_cookie(response)
response.finish
end
View
@@ -40,7 +40,7 @@ def set_data(data)
end
# save a cookie to the response
- def save(response)
+ def set_cookie(response)
response.set_cookie(AARRR::Config.cookie_name, {
:value => self.id,
:path => "/",
@@ -45,7 +45,7 @@ module AARRR
# save session to response
response = Rack::Response.new "some body", 200, {}
- @session.save(response)
+ @session.set_cookie(response)
response.header["Set-Cookie"].should include("_utmarr=#{@session.id}")
end

0 comments on commit 5a4b36c

Please sign in to comment.