lib/ajaxlibs/libraries/jrails.rb in ajaxlibs-0.1.7 vs lib/ajaxlibs/libraries/jrails.rb in ajaxlibs-0.1.8
- old
+ new
@@ -1,11 +1,20 @@
# JRails library, local support only.
# This is only the javascript support of JRails, you must install JRails plugin to have a full support.
+# TODO : require jrails gem (or fail) if included
class Ajaxlibs::Library::Jrails < Ajaxlibs::Library
Versions = ['0.5.0']
Requirements = {:all => {:jqueryui => nil}}
def local_only?
true
+ end
+
+ def initialize(options = {})
+ require 'rubygems'
+ require 'jrails' # Check if we have jrails support before trying to load it
+ super
+ rescue LoadError
+ raise "jrails gem is missing, you must install it."
end
end
\ No newline at end of file