Skip to content

Commit

Permalink
Made skills menu use a dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-endacott committed Jun 2, 2013
1 parent 8cc0f0f commit 990cdd5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/models/skill.rb
Expand Up @@ -6,6 +6,10 @@ def self.valid_skills
['Web Dev', 'C++', 'JavaScript']
end

def self.valid_skills_dropdown
['Select a new skill'] + valid_skills
end

validates_inclusion_of :name, :in => self.valid_skills

end
2 changes: 1 addition & 1 deletion app/views/users/_skills.html.haml
Expand Up @@ -10,7 +10,7 @@
= f.error_notification

.form-inputs
= f.input :name
= f.input :name, collection: Skill.valid_skills_dropdown, default: 1

.form-actions
= f.button :submit
1 change: 0 additions & 1 deletion db/schema.rb
Expand Up @@ -34,7 +34,6 @@
t.string "photo_content_type"
t.integer "photo_file_size"
t.datetime "photo_updated_at"
t.string "Demo"
t.string "demo_link"
end

Expand Down

0 comments on commit 990cdd5

Please sign in to comment.