Method: Effective::Resources::Sql#max_id
- Defined in:
- app/models/effective/resources/sql.rb
#max_id ⇒ Object
22 23 24 25 |
# File 'app/models/effective/resources/sql.rb', line 22 def max_id return 999999 unless klass.respond_to?(:unscoped) @max_id ||= klass.unscoped.maximum(klass.primary_key).to_i end |