Sorry, this entry is only available in 日本語.
Tag Archives: Ruby
Rails: Realize nl2br in PHP
Here’s the code to realise nl2br of PHP in Rails.
Environment
(Unless Rails changes considerably), it can be used in most versions.
- Rails 4.2.5
- Ruby 2.0.0
(日本語) Rails Sprockets::Rails::Helper::AssetFilteredError
(日本語) Rails application.js を application.js.coffee や application.js.erb にする
Ruby: Round Down with some decimal places
Memorized the way to round down number to the nth decimal places in Ruby.
The number like 0.81235 (Float) has function floor, which round down the number to zeal number, can’t round down to some decimal places.
Environment
- Ruby 2.2.3p173
- OS: Ubuntu 15.04

