Closed GoogleCodeExporter closed 8 years ago
The problem is that Rails.root changed in 2.3. Line 5 of
calendar_date_select.rb should be changed to:
if Object.const_defined?(:Rails) && File.directory?(Rails.root.join("public"))
This of course will fail in 2.2, so we probably want a more robust tweak
Original comment by nmeerssc...@mac.com
on 2 Feb 2009 at 8:27
Actually, here's a slightly better (backwards compatible) version:
if Object.const_defined?(:Rails) && File.directory?(Rails.root.is_a?(String) ?
(Rails.root + "/public") :
Rails.root.join("public"))
Original comment by nmeerssc...@mac.com
on 2 Feb 2009 at 8:33
What about Rails.root.to_s + "/public" ?
Original comment by timchar...@gmail.com
on 2 Feb 2009 at 8:35
Original comment by timchar...@gmail.com
on 2 Feb 2009 at 8:35
I just tried this:
if Object.const_defined?(:Rails) && File.directory?(Rails.root.to_s + "/public")
it works in 2.3.
Original comment by edwin.m...@gmail.com
on 19 Feb 2009 at 8:43
Original comment by timchar...@gmail.com
on 20 Feb 2009 at 5:30
Original issue reported on code.google.com by
mdirwi...@att.net
on 3 Dec 2008 at 3:01