Calling.r on a string turns it into a regular expression; we use raw (triple-quoted) strings here to avoid having to double-escape backslashes.
在一个字符串上调用。r会把它变成一个正则表达式;我们是用了原始(三重引号)字符串来避免诸多双重转义的反斜杠。
The raw operator is new to Rails 3. Counter to previous releases of Rails, all strings are emitted safe, stripped of HTML, by default.
raw操作数是Rails3中新增的功能。与以前版本的Rails不同,默认情况下所有的字符串都可以(去掉了HTML)安全发送。
Maybe have a class that hides the raw details of your persistence mechanism, but for now uses SQL strings underneath it.
可能会需要有一个类用来隐藏持续机制的原始细节,但眼下还是使用SQL字符串。
Maybe have a class that hides the raw details of your persistence mechanism, but for now uses SQL strings underneath it.
可能会需要有一个类用来隐藏持续机制的原始细节,但眼下还是使用SQL字符串。
应用推荐