lib/rich/cms/actionpack/action_view/base.rb in rich_cms-2.0.7 vs lib/rich/cms/actionpack/action_view/base.rb in rich_cms-2.1.0
- old
+ new
@@ -1,23 +1,23 @@
module ActionView
class Base
-
- def rich_cms
- render :file => File.join(File.dirname(__FILE__), "..", "..", "..", "..", "app", "views", "rich_cms.html.erb") if display_rich_cms?
- end
-
+
+ def rich_cms
+ render :file => File.expand_path("../../../../../../app/views/rich_cms.html.erb", __FILE__) if display_rich_cms?
+ end
+
def display_rich_cms?
!!session[:rich_cms].try(:fetch, :display, nil)
end
-
- def link(name, options = nil)
- options = {:class => options || name.underscore} unless options.is_a?(Hash)
- link_to name, "#", options
- end
-
- def rich_cms_tag(*args)
- Rich::Cms::Engine.to_content_tag *args
- end
+
+ def link(name, options = nil)
+ options = {:class => options || name.underscore} unless options.is_a?(Hash)
+ link_to name, "#", options
+ end
+
+ def rich_cms_tag(*args)
+ Rich::Cms::Engine.to_content_tag *args
+ end
end
end