mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
14 lines
311 B
Ruby
14 lines
311 B
Ruby
unless Rails.version =~ /^4/
|
|
module ActiveRecord
|
|
class Relation
|
|
# Patch Rails 3 ActiveRecord::Relation to noop on Rails 4 references
|
|
# thereby getting code that works for rails 3 and 4 without
|
|
# deprecation warnings
|
|
|
|
def references(*args)
|
|
self
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|