mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-28 19:56:11 +01:00
Better error messages
This commit is contained in:
parent
c2bd1b0d81
commit
511a4a23b6
3 changed files with 4 additions and 6 deletions
|
|
@ -62,8 +62,8 @@ class DataController < ApplicationController
|
|||
flash[:notice] = t 'data.import.projects_count', count: count
|
||||
when 'todos'
|
||||
count = Todo.import path_and_file, params, current_user
|
||||
if not count
|
||||
flash[:error] = t('data.import.errors.invalid_destination')
|
||||
if ! count
|
||||
flash[:error] = t('data.import.errors.no_context')
|
||||
else
|
||||
flash[:notice] = t 'data.import.todos_count', count: count
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue