Module: ModelSearcher
- Defined in:
- lib/model_searcher.rb,
lib/model_searcher/version.rb
Constant Summary collapse
- VERSION =
"0.2.0"
Class Method Summary collapse
Class Method Details
.file_path(file_path = nil) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/model_searcher.rb', line 11 def file_path(file_path=nil) @file_path ||= if defined? Rails "#{Rails.root}/app/models" else file_path end end |
.find(table_name) ⇒ Object
7 8 9 |
# File 'lib/model_searcher.rb', line 7 def find(table_name) models[table_name.to_sym] end |