エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Ruby on Rails 5.0 Release Notes — Ruby on Rails Guides
store_listing = StoreListing.new(price_in_cents: '10.1') # before store_listing.price_in_cents # ... store_listing = StoreListing.new(price_in_cents: '10.1') # before store_listing.price_in_cents # => BigDecimal.new(10.1) StoreListing.new.my_string # => "original default" class StoreListing < ActiveRecord::Base attribute :price_in_cents, :integer # custom type attribute :my_string, :string, default: "new default" # default value attribute :my_default_proc, :datetime, default: -> { Time.now } # de







2016/04/20 リンク