merb_activerecord 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake/gempackagetask'
3
3
 
4
4
  PLUGIN = "merb_activerecord"
5
5
  NAME = "merb_activerecord"
6
- VERSION = "0.4.2"
6
+ VERSION = "0.4.3"
7
7
  AUTHOR = "Duane Johnson"
8
8
  EMAIL = "canadaduane@gmail.com"
9
9
  HOMEPAGE = "http://merbivore.com"
@@ -4,8 +4,8 @@ class <%= class_name %> < Application
4
4
  provides :xml, :js, :yaml
5
5
 
6
6
  def index
7
- @<%= ivar %>s = <%= klass %>.find(:all)
8
- render @<%= ivar %>s
7
+ @<%= ivar.pluralize %> = <%= klass %>.find(:all)
8
+ render @<%= ivar.pluralize %>
9
9
  end
10
10
 
11
11
  def show
@@ -5,15 +5,15 @@ module Merb
5
5
  def setup_session
6
6
  MERB_LOGGER.info("Setting up session")
7
7
  before = cookies[_session_id_key]
8
- @_session, cookies[_session_id_key] = Merb::ActiveRecordSession.persist(cookies[_session_id_key])
9
- @_fingerprint = Marshal.dump(@_session.data).hash
8
+ request.session, cookies[_session_id_key] = Merb::ActiveRecordSession.persist(cookies[_session_id_key])
9
+ @_fingerprint = Marshal.dump(request.session.data).hash
10
10
  @_new_cookie = cookies[_session_id_key] != before
11
11
  end
12
12
 
13
13
  def finalize_session
14
14
  MERB_LOGGER.info("Finalize session")
15
- @_session.save if @_fingerprint != Marshal.dump(@_session.data).hash
16
- set_cookie(_session_id_key, @_session.session_id, _session_expiry) if (@_new_cookie || @_session.needs_new_cookie)
15
+ request.session.save if @_fingerprint != Marshal.dump(request.session.data).hash
16
+ set_cookie(_session_id_key, request.session.session_id, _session_expiry) if (@_new_cookie || request.session.needs_new_cookie)
17
17
  end
18
18
  end # ActiveRecordMixin
19
19
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: merb_activerecord
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.2
7
- date: 2007-11-06 00:00:00 -06:00
6
+ version: 0.4.3
7
+ date: 2007-11-12 00:00:00 -06:00
8
8
  summary: Merb plugin that provides ActiveRecord support for Merb
9
9
  require_paths:
10
10
  - lib