Module: ActiveScaffold::Tableless::Tableless

Defined in:
lib/active_scaffold/tableless.rb

Instance Method Summary collapse

Instance Method Details

#association_scopeObject


65
66
67
68
# File 'lib/active_scaffold/tableless.rb', line 65

def association_scope
  @association_scope ||= AssociationScope.scope(self, klass.connection) if klass < ActiveScaffold::Tableless
  super
end

#skip_statement_cache?(scope) ⇒ Boolean

Returns:

  • (Boolean)

61
62
63
# File 'lib/active_scaffold/tableless.rb', line 61

def skip_statement_cache?
  klass < ActiveScaffold::Tableless ? true : super
end

#target_scopeObject


75
76
77
78
79
80
81
# File 'lib/active_scaffold/tableless.rb', line 75

def target_scope
  super.tap do |scope|
    if klass < ActiveScaffold::Tableless
      class << scope; include RelationExtension; end
    end
  end
end