Suppose we have some model and we want to localize it, first of all we need to now i18n_key...

class CreateFakes < ActiveRecord::Migration def change create_table :fakes do |t| t.decimal :float_value, :precision => 4, :scale => 3 end

Add in Gemfile: group :development, :test do gem 'rspec-rails' gem 'spork-rails' end group :test do gem 'capybara'

Best results in other decks

In Rails 8 the behavior of the rails db:migrate command has changed for fresh databases (see PR #52830).

There's a method Integer() defined on Kernel, that typecasts everything into an Integer. Integer("2") # 2 Integer("foo") # Invalid...

Search in all decks