rlayout 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ Changes in version 0.3.1 (2008-06-16)
2
+ -------------------------------------
3
+ performance enchance, use thread local handle view binding to avoid request binding by 'send' method for each tag
4
+
1
5
  Changes in version 0.3.0 (2008-06-15)
2
6
  -------------------------------------
3
7
  support theme template for field tag
data/README CHANGED
@@ -1,4 +1,4 @@
1
- Rails Layout Extension, release 0.3.0 (Jun. 2008)
1
+ Rails Layout Extension, release 0.3.1 (Jun. 2008)
2
2
 
3
3
  Feature
4
4
  =======
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'rake/gempackagetask'
3
3
  PKG_NAME = "rlayout"
4
- PKG_VERSION = "0.3.0"
4
+ PKG_VERSION = "0.3.1"
5
5
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
6
6
  PKG_FILES = FileList[
7
7
  '[A-Z]*',
@@ -49,7 +49,7 @@ class Rlayout::TemplateUtil
49
49
  unless key.nil?
50
50
  context[:body] = str
51
51
  view_context.field_context=context
52
- str = ERB.new(get_template(key, tag_name)).result(view_context.send(:binding))
52
+ str = ERB.new(get_template(key, tag_name)).result(Thread.current[:rlayout][:view_binding])
53
53
  view_context.field_context=nil
54
54
  end
55
55
  str
data/lib/rlayout.rb CHANGED
@@ -30,6 +30,7 @@ ActionView::Base.class_eval do
30
30
  initialize_old4template(*args)
31
31
  Thread.current[:rlayout] ||= {}
32
32
  Thread.current[:rlayout][:view_context] = self
33
+ Thread.current[:rlayout][:view_binding] = binding
33
34
  end
34
35
 
35
36
  #for page layout
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rlayout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leon Li