Module: ActsAsJoinable

Defined in:
lib/acts-as-joinable.rb,
lib/acts_as_joinable/core.rb,
lib/acts_as_joinable/dirty.rb

Overview

github.com/pluginaweek/preferences/blob/master/lib/preferences.rb add changes so you can track when the join model changes

Defined Under Namespace

Modules: ClassMethods, Core, Dirty

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



20
21
22
# File 'lib/acts-as-joinable.rb', line 20

def self.included(base)
  base.extend ClassMethods
end

.modelsObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/acts-as-joinable.rb', line 4

def self.models
  unless @models
    if defined?(Rails)
      @models = Dir[Dir.pwd + "/app/models/*.rb"].collect { |f| File.basename f, '.rb' }
    else
      @models = []
    end
  end
  
  @models
end

.models=(value) ⇒ Object



16
17
18
# File 'lib/acts-as-joinable.rb', line 16

def self.models=(value)
  @models = value
end