diff --git a/app/assets/javascripts/models/story.js b/app/assets/javascripts/models/story.js index d51111719..79ba5f964 100644 --- a/app/assets/javascripts/models/story.js +++ b/app/assets/javascripts/models/story.js @@ -121,7 +121,7 @@ Fulcrum.Story = Backbone.Model.extend({ }, point_values: function() { - return this.collection.project.get('point_values'); + return this.collection.project.get('point_values').slice(0, 6); }, // List available state transitions for this story diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 2452563c6..efe2600dc 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -3,7 +3,7 @@ module ProjectsHelper # use in a select helper. def point_scale_options Project::POINT_SCALES.collect do |name,values| - ["#{name.humanize} (#{values.join(',')})", name] + ["#{name.humanize} (#{values.first(6).join(',')})", name] end end diff --git a/app/models/project.rb b/app/models/project.rb index 05debdbe4..14e634566 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -9,9 +9,9 @@ class Project < ActiveRecord::Base # These are the valid point scalse for a project. These represent # the set of valid points estimate values for a story in this project. POINT_SCALES = { - 'fibonacci' => [0,1,2,3,5,8], - 'powers_of_two' => [0,1,2,4,8], - 'linear' => [0,1,2,3,4,5], + 'fibonacci' => [0,1,2,3,5,8,10,12,16,24,32,40], + 'powers_of_two' => (0..40).step(2).to_a, + 'linear' => (0..20).step(1).to_a, } validates_inclusion_of :point_scale, :in => POINT_SCALES.keys, :message => "%{value} is not a valid estimation scheme" diff --git a/db/migrate/20110210082458_devise_create_users.rb b/db/migrate/20110210082458_devise_create_users.rb index 4bbe30eb6..1a428ae11 100644 --- a/db/migrate/20110210082458_devise_create_users.rb +++ b/db/migrate/20110210082458_devise_create_users.rb @@ -1,14 +1,50 @@ class DeviseCreateUsers < ActiveRecord::Migration def self.up create_table(:users) do |t| - t.database_authenticatable :null => false - t.recoverable - t.rememberable - t.trackable - t.confirmable - t.encryptable - # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both - # t.token_authenticatable + ## Database authenticatable + ## t.database_authenticatable :null => false + t.string :email, :null => false, :default => "" + t.string :encrypted_password, :null => false, :default => "" + ## Recoverable + ## t.recoverable + t.string :reset_password_token + #t.datetime :reset_password_sent_at + + ## Rememberable + ## t.rememberable + t.datetime :remember_created_at + + ## Trackable + ## t.trackable + t.integer :sign_in_count, :default => 0 + t.datetime :current_sign_in_at + t.datetime :last_sign_in_at + t.string :current_sign_in_ip + t.string :last_sign_in_ip + + ## Encryptable + ## t.encryptable + t.string :password_salt + + ## Confirmable + ## t.confirmable + t.string :confirmation_token + t.datetime :confirmed_at + t.datetime :confirmation_sent_at + t.string :unconfirmed_email # Only if using reconfirmable + + ## Lockable + ## t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both + # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts + # t.string :unlock_token # Only if unlock strategy is :email or :both + # t.datetime :locked_at + + ## Token authenticatable + ## t.token_authenticatable + # t.string :authentication_token + + ## Invitable + # t.string :invitation_token t.timestamps