Method: Ransack::Context.for
- Defined in:
- lib/ransack/context.rb
.for(object, options = {}) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/ransack/context.rb', line 19 def for(object, = {}) context = if Class === object for_class(object, ) else for_object(object, ) end context or raise ArgumentError, "Don't know what context to use for #{object}" end |