rlayout 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/CHANGELOG +4 -0
  2. data/README +3 -1
  3. data/Rakefile +1 -1
  4. data/lib/rlayout.rb +14 -0
  5. metadata +2 -2
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ Changes in version 0.2.0 (2008-05-21)
2
+ -------------------------------------
3
+ feature:use controller method if helper method requested from erb not exists
4
+
1
5
  Changes in version 0.1.4 (2008-05-13)
2
6
  -------------------------------------
3
7
  fix a bugs when options is nil and erb set layout false
data/README CHANGED
@@ -1,4 +1,4 @@
1
- Rails Layout Extension, release 0.1.4 (May. 2008)
1
+ Rails Layout Extension, release 0.2.0 (May. 2008)
2
2
 
3
3
  Feature
4
4
  =======
@@ -6,6 +6,8 @@ Feature
6
6
  ��content_for��ʹ�ã���������YAML��key/value��ʽ����content_for����
7
7
  2. let erb file can determine layout by changing the default behavior of layout determining, just like java's sitemesh
8
8
  ͨ���ı�Ĭ�ϵ�layout��ȡ��ʽ��ʹerbҲ���Զ���layout������java��sitemesh
9
+ 3. use controller method if helper method requested from erb not exists
10
+ ERB����helper�ķ��������ڣ����Զ�����controller�ķ���
9
11
 
10
12
  Setup
11
13
  =======
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.1.4"
4
+ PKG_VERSION = "0.2.0"
5
5
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
6
6
  PKG_FILES = FileList[
7
7
  '[A-Z]*',
data/lib/rlayout.rb CHANGED
@@ -2,6 +2,20 @@
2
2
  author: Leon Li(scorpio_leon@hotmail.com)
3
3
  =end
4
4
  require 'rlayout/layout'
5
+ require 'action_view'
6
+
5
7
  ActionController::Base.class_eval do
6
8
  include Rlayout::Layout
9
+ end
10
+
11
+ ActionView::Base.class_eval do
12
+ include ActionView::Helpers::NestedLayoutsHelper
13
+ def method_missing(method_id, *args)
14
+ ActionView::Base.class_eval %{
15
+ def #{method_id}(*args)
16
+ @controller.#{method_id}(*args)
17
+ end
18
+ }
19
+ send(method_id, *args)
20
+ end
7
21
  end
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.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leon Li
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-13 00:00:00 +08:00
12
+ date: 2008-05-21 00:00:00 +08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15