mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-30 20:55:17 +01:00
Merge pull request #206 from mmozuras/refactor_unless_blanks_into_presents
Refactor unless blanks into presents
This commit is contained in:
commit
e2eb31cfcc
15 changed files with 25 additions and 25 deletions
|
|
@ -49,7 +49,7 @@ module IsTaggable
|
|||
def _add_tags incoming
|
||||
tag_cast_to_string(incoming).each do |tag_name|
|
||||
# added following check to prevent empty tags from being saved (which will fail)
|
||||
unless tag_name.blank?
|
||||
if tag_name.present?
|
||||
begin
|
||||
tag = Tag.where(:name => tag_name).first_or_create
|
||||
raise Tag::Error, "tag could not be saved: #{tag_name}" if tag.new_record?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue