Title / Description
Code def check_rights begin name = self.class.name.underscore.split("_")[0].capitalize.singularize o = eval(name).find(params[:id]) notowner = o.user != current_user rescue end raise "not an owner!" if notowner end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code