Rails 3 提供了 match 方法供我们自定义 routes,然而我们要小心使用它以避免“跨站脚本攻击”(XSS Attack)。比如像这样的 routes:
注:(r3 代表 Rails 3,r4 代表 Rails 4)
# routes.rbsudo apt-get install ghostscriptiapi.h etc) which are required but don't come with the default Ghostscript package: sudo apt-get install libgs-devsudo apt-get install gs-espsudo apt-get --purge remove imagemagickcd ImageMagick-xx./configure --with-gslib=yes [and what else you need]gslib yes yes and not gslib yes nomakemake installconvert -list configure | grep DELEGATES => DELEGATES bzlib djvu freetype gs jpeg jng jp2 lcms png tiff x11 xml zlib| require "java" | |
| $: << File.join(File.dirname(__FILE__), 'lib') | |
| require 'scala-library' | |
| require 'akka/akka-actor-1.1.2' | |
| java_import 'akka.actor.Actors' | |
| java_import 'akka.actor.ActorRef' | |
| java_import 'akka.actor.UntypedActor' |