Skip to content

Commit

Permalink
Refs issue #10: Adds last name validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Brand committed Nov 3, 2017
1 parent 237e966 commit 8691fb1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/author.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class Author < ActiveRecord::Base
validates :last_name, presence: true,
length: { minimum: 1 }
def name
first_name + ' ' + last_name
end
Expand Down

0 comments on commit 8691fb1

Please sign in to comment.