Parent

Methods

Files

Class Index [+]

Quicksearch

Ubiquo::Filters::FilterTestModel

A helper model to be able to execute filters.

Public Class Methods

create() click to toggle source

(Not documented)

    # File vendor/plugins/ubiquo_core/lib/ubiquo/filters/ubiquo_filter_test_case.rb, line 28
28:       def self.create
29:         table = 'filter_tests'
30:         conn = ::ActiveRecord::Base.connection
31:         conn.drop_table(table) if conn.tables.include?(table)
32: 
33:         conn.create_table table.to_sym do |t|
34:           t.string   :title
35:           t.text     :description
36:           t.datetime :published_at
37:           t.boolean  :status, :default => false
38:           t.timestamps
39:         end
40: 
41:         model = table.classify
42:         Object.const_set(model, Class.new(::ActiveRecord::Base)) unless Object.const_defined? model
43:         model.constantize
44:       end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.