Class: ThinkingSphinx::ActiveRecord::ColumnSQLPresenter
- Inherits:
-
Object
- Object
- ThinkingSphinx::ActiveRecord::ColumnSQLPresenter
- Defined in:
- lib/thinking_sphinx/active_record/column_sql_presenter.rb
Instance Method Summary collapse
- #aggregate? ⇒ Boolean
-
#initialize(model, column, adapter, associations) ⇒ ColumnSQLPresenter
constructor
A new instance of ColumnSQLPresenter.
- #with_table ⇒ Object
Constructor Details
#initialize(model, column, adapter, associations) ⇒ ColumnSQLPresenter
Returns a new instance of ColumnSQLPresenter.
4 5 6 |
# File 'lib/thinking_sphinx/active_record/column_sql_presenter.rb', line 4 def initialize(model, column, adapter, associations) @model, @column, @adapter, @associations = model, column, adapter, associations end |
Instance Method Details
#aggregate? ⇒ Boolean
8 9 10 11 12 |
# File 'lib/thinking_sphinx/active_record/column_sql_presenter.rb', line 8 def aggregate? path.aggregate? rescue Joiner::AssociationNotFound false end |
#with_table ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/thinking_sphinx/active_record/column_sql_presenter.rb', line 14 def with_table return __name if string? return nil unless exists? quoted_table = escape_table? ? escape_table(table) : table "#{quoted_table}.#{adapter.quote __name}" end |