Module: Runes::RubberbandExtension

Defined in:
lib/runes/rubberband_extension.rb

Instance Method Summary collapse

Instance Method Details

#ar_equivalenceObject



3
4
5
6
7
8
9
10
# File 'lib/runes/rubberband_extension.rb', line 3

def ar_equivalence
  model = _type.gsub(/-/,'/').classify.constantize
  begin
    model.find(id) 
  rescue ActiveRecord::RecordNotFound
    nil
  end
end