Add followable to budget investment model.
This commit is contained in:
committed by
Senén Rodero Rodríguez
parent
84dbef16a4
commit
bce28afe36
@@ -18,11 +18,6 @@ class FollowsController < ApplicationController
|
||||
private
|
||||
|
||||
def find_followable
|
||||
params.each do |name, value|
|
||||
if name =~ /(.+)_id$/
|
||||
return $1.classify.constantize.find(value)
|
||||
end
|
||||
end
|
||||
nil
|
||||
params[:followable_type].constantize.find(params[:followable_id])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user