Permalink
Browse files

fixing layout path issue in Rails 2.1

  • Loading branch information...
ryanb committed Jun 29, 2008
1 parent ebf9a4f commit b87151cb56a20d75de0ee07edeea21df15bb5184
Showing with 3 additions and 4 deletions.
  1. +2 −1 init.rb
  2. +1 −3 lib/selenium_on_rails/paths.rb
View
@@ -6,7 +6,8 @@
$LOAD_PATH << File.dirname(__FILE__) + "/lib/controllers"
require 'selenium_controller'
require File.dirname(__FILE__) + '/routes'
-
+
+ SeleniumController.prepend_view_path File.expand_path(File.dirname(__FILE__) + '/lib/views')
else
#erase all traces
$LOAD_PATH.delete lib_path
@@ -17,9 +17,7 @@ def view_path view
# to the app/views/ directory since Rails doesn't support absolute paths
# to layout templates.
def layout_path
- rails_root = Pathname.new File.expand_path(File.join(RAILS_ROOT, 'app/views'))
- view_path = Pathname.new view_path('layout')
- view_path.relative_path_from(rails_root).to_s
+ '/layout.rhtml'
end
def fixtures_path

0 comments on commit b87151c

Please sign in to comment.