Allow the use of fast_jsonapi when ActiveRecord isn't present
This commit is contained in:
parent
b30a53bc5f
commit
6b593cb36a
@ -1,3 +1,4 @@
|
|||||||
|
begin
|
||||||
require 'active_record'
|
require 'active_record'
|
||||||
|
|
||||||
::ActiveRecord::Associations::Builder::HasOne.class_eval do
|
::ActiveRecord::Associations::Builder::HasOne.class_eval do
|
||||||
@ -14,3 +15,6 @@ require 'active_record'
|
|||||||
CODE
|
CODE
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
rescue LoadError
|
||||||
|
# active_record can't be loaded so we shouldn't try to monkey-patch it.
|
||||||
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user