Support namespaced models for watcher functionality

pull/41/head
Gregor Schmidt 13 years ago
parent ee543489f1
commit 52cfe225f7
  1. 2
      app/controllers/watchers_controller.rb

@ -63,7 +63,7 @@ class WatchersController < ApplicationController
private
def find_project
klass = Object.const_get(params[:object_type].camelcase)
klass = params[:object_type].camelcase.constantize
return false unless klass.respond_to?('watched_by')
@watched = klass.find(params[:object_id])
@project = @watched.project

Loading…
Cancel
Save