エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
How Rails' Type Casting Works
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
How Rails' Type Casting Works
Have you ever noticed that when you assign a property to an Active Record model and read it back,... Have you ever noticed that when you assign a property to an Active Record model and read it back, the value isn’t always the same? Here’s an example: class StoreListing < ActiveRecord::Base connection.create_table :store_listings, force: true do |t| t.integer :price_in_cents end end store_listing = StoreListing.new store_listing.price_in_cents = "100" # Note, this is a string store_listing.price_i