Rails 3 提供了 match
方法供我们自定义 routes,然而我们要小心使用它以避免“跨站脚本攻击”(XSS Attack)。比如像这样的 routes:
注:(r3 代表 Rails 3,r4 代表 Rails 4)
# routes.rb
sudo apt-get install ghostscript
iapi.h
etc) which are required but don't come with the default Ghostscript package: sudo apt-get install libgs-dev
sudo apt-get install gs-esp
sudo apt-get --purge remove imagemagick
cd ImageMagick-xx
./configure --with-gslib=yes
[and what else you need]gslib yes yes
and not gslib yes no
make
make install
convert -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' |