diff options
author | Philip Arndt <parndt@gmail.com> | 2010-09-03 23:32:07 +1200 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2010-09-03 23:32:07 +1200 |
commit | a2f655b55eb30a900020e8aff9601ed0606ce58f (patch) | |
tree | d57cf7aef6ae36a4751144587fab7fe2e508d491 /lib/refinerycms-blog.rb | |
parent | c4222bfdf5733d1552a2ecf4468d89cf89a583b1 (diff) | |
download | refinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.tar.gz refinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.tar.bz2 refinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.zip |
Hello rails3 support.
Diffstat (limited to 'lib/refinerycms-blog.rb')
-rw-r--r-- | lib/refinerycms-blog.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/refinerycms-blog.rb b/lib/refinerycms-blog.rb index 1235d60..3fd844e 100644 --- a/lib/refinerycms-blog.rb +++ b/lib/refinerycms-blog.rb @@ -21,12 +21,28 @@ module Refinery :class => BlogPost } end + + # refinery 0.9.8 had a bug that we later found through using this engine. + # the bug was that the plugin urls were not :controller => '/admin/whatever' + if Refinery.version == '0.9.8' + ::Refinery::Plugin.class_eval %{ + alias_method :old_url, :url + + def url + if (plugin_url = self.old_url).is_a?(Hash) and plugin_url[:controller] =~ %r{^admin} + plugin_url[:controller] = "/\#{plugin_url[:controller]}" + end + + plugin_url + end + } + end end end if defined?(Rails::Engine) class << self def version - %q{1.0.rc3} + %q{1.0.rc4} end end end |