forked from bofh/fetsite
AutoCommit Die Aug 4 22:03:01 CEST 2015
This commit is contained in:
@@ -20,6 +20,7 @@ module Flagable
|
||||
|
||||
@obj=controller_name.classify.constantize.find(params[:id])
|
||||
lflag=("flag_"+params[:flag]).to_sym
|
||||
authorize! lflag, @obj
|
||||
unless params[:flag].nil? || params[:flag].empty? || params[:value].nil?
|
||||
if @obj.respond_to?(lflag.to_s+"=")
|
||||
@obj.send(lflag.to_s+"=",params[:value]=="true")
|
||||
|
||||
Reference in New Issue
Block a user