diff options
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 2 | ||||
-rw-r--r-- | lib/api/notes.rb | 2 | ||||
-rw-r--r-- | lib/api/todos.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 5e66b4e76a5..4202c037707 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -978,7 +978,7 @@ module API expose :created_at def todo_target_class(target_type) - ::API::Entities.const_get(target_type) + ::API::Entities.const_get(target_type, false) end end diff --git a/lib/api/notes.rb b/lib/api/notes.rb index 84563d66ee8..a7f61894644 100644 --- a/lib/api/notes.rb +++ b/lib/api/notes.rb @@ -80,7 +80,7 @@ module API note = create_note(noteable, opts) if note.valid? - present note, with: Entities.const_get(note.class.name) + present note, with: Entities.const_get(note.class.name, false) else bad_request!("Note #{note.errors.messages}") end diff --git a/lib/api/todos.rb b/lib/api/todos.rb index 404675bfaec..e3f3aca27df 100644 --- a/lib/api/todos.rb +++ b/lib/api/todos.rb @@ -49,7 +49,7 @@ module API resource :todos do helpers do def issuable_and_awardable?(type) - obj_type = Object.const_get(type) + obj_type = Object.const_get(type, false) (obj_type < Issuable) && (obj_type < Awardable) rescue NameError |