lib/rails-footnotes/notes/controller_note.rb in rails3-footnotes-4.0.0.pre.2 vs lib/rails-footnotes/notes/controller_note.rb in rails3-footnotes-4.0.0.pre.3
- old
+ new
@@ -36,10 +36,10 @@
end
#raise "File not found"
else
@controller_filename=File.join(File.expand_path(Rails.root), 'app', 'controllers', "#{controller_name}.rb").sub('/controllers/controllers/', '/controllers/')
end
- @controller_filename
+ @controller_filename if File.exist?(@controller_filename)
end
def controller_text
if controller_filename
@controller_text ||= IO.read(controller_filename)
\ No newline at end of file