Project

General

Profile

Patch #33329 » 0001-Fix-typo-in-find_objects_from_params.patch

Marius BĂLTEANU, 2020-04-20 14:48

View differences:

app/controllers/watchers_controller.rb
def find_project
if params[:object_type] && params[:object_id]
@watchables = find_objets_from_params
@watchables = find_objects_from_params
@projects = @watchables.map(&:project).uniq
if @projects.size == 1
@project = @projects.first
......
end
def find_watchables
@watchables = find_objets_from_params
@watchables = find_objects_from_params
unless @watchables.present?
render_404
end
......
users
end
def find_objets_from_params
def find_objects_from_params
klass = Object.const_get(params[:object_type].camelcase) rescue nil
return unless klass && klass.respond_to?('watched_by')
(3-3/5)