lib/cells/cell/base.rb in cells-3.3.3 vs lib/cells/cell/base.rb in cells-3.3.4
- old
+ new
@@ -156,10 +156,10 @@
# A template file will be looked for in each view path. This is typically
# just RAILS_ROOT/app/cells, but you might want to add e.g.
# RAILS_ROOT/app/views.
def add_view_path(path)
- path = ::Rails.root.join(path) if defined?(::Rails)
+ path = File.join(::Rails.root, path) if defined?(::Rails) and ::Rails.respond_to?(:root)
self.view_paths << path unless self.view_paths.include?(path)
end
# Creates a cell instance of the class <tt>name</tt>Cell, passing through
# <tt>opts</tt>.