Action name like "sort" is not possible?

Hi all

Just wondered that I can't create an action called sort in my controller... I guess this is due to the fact that there's already an "innate" method called "sort" in the controller? Could that be?

Not that I can see in 1.1.6 at least. Perhaps your #sort is not public? What error are you getting?

Is there a list of "names-not-to-use-for-actions" or something like that? Or is there a way to use these names anyway?

A good rule of thumb is to not use method names that already exist. To find them, try this in script/console:

  puts ApplicationController.instance_methods.sort

You should probably avoid clobbering private methods too:

  puts ApplicationController.private_instance_methods.sort

...although private methods in Object and Kernel are probably safe to override if you must:

  a, k, o = [ApplicationController, Kernel, Object].map{|m| m.private_instance_methods}   puts (a - k - o).sort