module Knitkit::Extensions::ActiveRecord::ThemeSupport::HasManyThemes::ActMacro
Public Instance Methods
active()
click to toggle source
# File lib/knitkit/extensions/active_record/theme_support/has_many_themes.rb, line 15 def active find(:all, :conditions => 'active = 1') end
has_many_themes(options = {})
click to toggle source
# File lib/knitkit/extensions/active_record/theme_support/has_many_themes.rb, line 11 def has_many_themes(options = {}) return if has_many_themes? has_many :themes, :dependent => :delete_all do def active find(:all, :conditions => 'active = 1') end end include InstanceMethods # FIXME instead, check for the association being present end
has_many_themes?()
click to toggle source
# File lib/knitkit/extensions/active_record/theme_support/has_many_themes.rb, line 23 def has_many_themes? included_modules.include?(Knitkit::Extensions::ActiveRecord::ThemeSupport::HasManyThemes::InstanceMethods) end