Class: ActiveRecord::Base

Inherits:
Object show all
Extended by:
FindByExtension, RandomID
Includes:
ToHtml, BelongsToMany
Defined in:
lib/vex/active_record/find_by_extension.rb,
lib/vex/active_record/belongs_to_many.rb,
lib/vex/active_record/random_id.rb,
lib/vex/active_record/lite_view.rb,
lib/vex/active_record/to_html.rb,
lib/vex/base/object/insp.rb

Class Method Summary collapse

Methods included from BelongsToMany

included

Methods included from BelongsToMany::Migrations

#migrate

Class Method Details

.drop_view(view) ⇒ Object


84
85
86
# File 'lib/vex/active_record/lite_view.rb', line 84

def self.drop_view(view)
  ActiveRecord::LiteView.drop_view(self, view)
end

.has_view(view, sql) ⇒ Object


88
89
90
91
92
93
94
# File 'lib/vex/active_record/lite_view.rb', line 88

def self.has_view(view, sql)
  has_one view, :class_name => ActiveRecord::LiteView.make(self, view, sql)

  define_method "#{view}_reset" do 
    instance_variable_set "@#{view}", nil
  end
end