Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
tomas alberto gomez molina
bd14-2015-1
Commits
3c38f9c2
Commit
3c38f9c2
authored
9 years ago
by
francisco javier casas barrientos
Browse files
Options
Download
Patches
Plain Diff
Added CarType name validation.
parent
3c5185cc
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/car_type.rb
+2
-0
app/models/car_type.rb
with
2 additions
and
0 deletions
+2
-0
app/models/car_type.rb
+
2
−
0
View file @
3c38f9c2
...
...
@@ -3,5 +3,7 @@ class CarType < ActiveRecord::Base
validates
:brand
,
:presence
=>
true
validates
:name
,
:presence
=>
true
validates_uniqueness_of
:name
,
:scope
=>
:brand
has_many
:cars
end
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets