Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

notification level for user

  • Loading branch information...
commit 4b3950456d666bc92fcf123532e73ae82c3c5e12 1 parent cf6d4dc
@randx randx authored
View
7 app/models/user.rb
@@ -54,6 +54,13 @@ class User < ActiveRecord::Base
#
+ # Notification levels
+ #
+ N_DISABLED = 0
+ N_PARTICIPATING = 1
+ N_WATCH = 2
+
+ #
# Relations
#
View
5 db/migrate/20130325173941_add_notification_level_to_user.rb
@@ -0,0 +1,5 @@
+class AddNotificationLevelToUser < ActiveRecord::Migration
+ def change
+ add_column :users, :notification_level, :integer, null: false, default: 1
+ end
+end
View
3  db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130318212250) do
+ActiveRecord::Schema.define(:version => 20130325173941) do
create_table "events", :force => true do |t|
t.string "target_type"
@@ -270,6 +270,7 @@
t.boolean "can_create_team", :default => true, :null => false
t.string "state"
t.integer "color_scheme_id", :default => 1, :null => false
+ t.integer "notification_level", :default => 1, :null => false
end
add_index "users", ["admin"], :name => "index_users_on_admin"
Please sign in to comment.
Something went wrong with that request. Please try again.