module Shorter::ActiveRecord
Public Instance Methods
method_missing(method_name, *args, &block)
click to toggle source
Calls superclass method
# File lib/shorter/active_record.rb, line 3 def method_missing(method_name, *args, &block) if ::ActiveRecord::Base.connected? model = TablesAndModels.instance.model(method_name) model.present? ? model.where(id: self).first : super else super end end