Commits

Antoni Segura Puimedon  committed 71de432

Made it compatible with ruby 1.8.x

  • Participants
  • Parent commits fb79da8

Comments (0)

Files changed (1)

File app/controllers/attributes_controller.rb

     def handle
         data = params[:data]
         action = params[:verb]
-        if not AttributesController.instance_methods(false).include?(action.intern)
+        if not AttributesController.method_defined?(action.intern)
             result = 'false'
-            render :json => "{\"success\": #{result}, \"data\": \"Unknown action\"}"
+            render :json => "{\"success\": #{result}, \"data\": \"Unknown action #{action}\"}"
         else
             send(action.intern)
         end