Implemented stats for ordergroups on startpage. Annotated models.
This commit is contained in:
parent
709425855e
commit
d848831fea
65 changed files with 407 additions and 338 deletions
11
db/migrate/20090731132547_add_stats_to_groups.rb
Normal file
11
db/migrate/20090731132547_add_stats_to_groups.rb
Normal 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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue