Add followable to budget investment model.

This commit is contained in:
taitus
2017-06-29 18:07:22 +02:00
committed by Senén Rodero Rodríguez
parent 84dbef16a4
commit bce28afe36
9 changed files with 92 additions and 134 deletions

View File

@@ -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