theme_support 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -149,6 +149,7 @@ The theme_support plugin includes patches from the following:
149
149
  Thanks guys!
150
150
 
151
151
  == Changelog
152
+ 3.0.1 - layout :mymethod works again
152
153
 
153
154
  3.0.0 - Converted theme_support plugin into a Rails 3.0 compatible gem.
154
155
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0
1
+ 3.0.1
@@ -15,14 +15,10 @@ class AbstractController::Base
15
15
  # 'theme_name'
16
16
  # end
17
17
 
18
- #class << self
19
- def self.theme(theme_name, conditions = {})
20
- # TODO: Allow conditions... (?)
21
- write_inheritable_attribute "theme", theme_name
22
- theme = ActionView::Base.process_view_paths(File.join("themes", theme_name, "views"))
23
- prepend_view_path(theme)
24
- end
25
- #end
18
+ def self.theme(theme_name, conditions = {})
19
+ # TODO: Allow conditions... (?)
20
+ write_inheritable_attribute "theme", theme_name
21
+ end
26
22
 
27
23
  # Retrieves the current set theme
28
24
  def current_theme(passed_theme=nil)
@@ -51,4 +47,4 @@ AbstractController::Layouts.module_eval do
51
47
  options[:layout] = File.join(theme_path, options[:layout])
52
48
  end
53
49
  end
54
- end
50
+ end
@@ -0,0 +1,14 @@
1
+ # Load the theme to execution and not in loading app
2
+ # TODO Check if this code works this action mailer
3
+ module ActionController
4
+ module ImplicitRender
5
+ alias_method :theme_support_default_render, :default_render
6
+
7
+ def default_render
8
+ theme = current_theme
9
+ theme = ActionView::Base.process_view_paths(File.join("themes", theme, "views"))
10
+ prepend_view_path(theme)
11
+ theme_support_default_render
12
+ end
13
+ end
14
+ end
data/lib/theme_support.rb CHANGED
@@ -7,6 +7,7 @@ require 'theme_support/theme_controller'
7
7
 
8
8
  # Initializes theme support by extending some of the core Rails classes
9
9
  require 'theme_support/patches/abstractcontroller_ex'
10
+ require 'theme_support/patches/actioncontroller_ex'
10
11
  require 'theme_support/patches/routeset_ex'
11
12
 
12
13
  # Add the tag helpers for rhtml and, optionally, liquid templates
@@ -5,7 +5,7 @@ spec = Gem::Specification.new do |s|
5
5
  s.name = 'theme_support'
6
6
  s.author = 'Pierre Yager and Sylvain Claudel'
7
7
  s.email = "pierre@levosgien.net"
8
- s.version = ("$Release: 3.0.0" =~ /[\.\d]+/) && $&
8
+ s.version = ("$Release: 3.0.1" =~ /[\.\d]+/) && $&
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.homepage = 'http://github.com/zedalaye/theme_support'
11
11
  s.rubyforge_project = 'theme-support'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: theme_support
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 0
10
- version: 3.0.0
9
+ - 1
10
+ version: 3.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pierre Yager and Sylvain Claudel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-08 00:00:00 +02:00
18
+ date: 2010-09-09 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -38,6 +38,7 @@ files:
38
38
  - lib/generators/theme/templates/preview.png
39
39
  - lib/generators/theme/theme_generator.rb
40
40
  - lib/theme_support.rb
41
+ - lib/theme_support/patches/actioncontroller_ex.rb
41
42
  - lib/theme_support/patches/abstractcontroller_ex.rb
42
43
  - lib/theme_support/patches/routeset_ex.rb
43
44
  - lib/theme_support/patches/actionmailer_ex.rb