Implemented stats for ordergroups on startpage. Annotated models.

This commit is contained in:
Benjamin Meichsner 2009-08-01 13:41:22 +02:00
parent 709425855e
commit d848831fea
65 changed files with 407 additions and 338 deletions

View file

@ -0,0 +1,11 @@
class AddStatsToGroups < ActiveRecord::Migration
def self.up
add_column :groups, :stats, :text
Ordergroup.all.each { |o| o.update_stats! }
end
def self.down
remove_column :groups, :stats
end
end

View file

@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20090405131156) do
ActiveRecord::Schema.define(:version => 20090731132547) do
create_table "article_categories", :force => true do |t|
t.string "name", :default => "", :null => false
@ -135,6 +135,7 @@ ActiveRecord::Schema.define(:version => 20090405131156) do
t.string "contact_person"
t.string "contact_phone"
t.string "contact_address"
t.text "stats"
end
add_index "groups", ["name"], :name => "index_groups_on_name", :unique => true