Hello rails3 support.
This commit is contained in:
parent
c4222bfdf5
commit
a2f655b55e
20 changed files with 288 additions and 51 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue