lib/evertils/controllers/render.rb in evertils-2.0.0 vs lib/evertils/controllers/render.rb in evertils-2.0.1

- old
+ new

@@ -4,12 +4,14 @@ module Controller class Render < Controller::Base def from_file set_allowed_fields - return Notify.warning("Note already exists\n- #{@link}") if note_exists? + if @allowed_fields[:action] == 'create' + return Notify.warning("Note already exists\n- #{@link}") if note_exists? - Notify.info 'Note not found, creating a new one' + Notify.info 'Note not found, creating a new one' + end execute_action(@allowed_fields[:action]) end def note_exists?