Upgrade to Pro — share decks privately, control downloads, hide ads and more …

New Features in Rails 4.2

murajun1978
February 21, 2015

New Features in Rails 4.2

murajun1978

February 21, 2015
Tweet

More Decks by murajun1978

Other Decks in Programming

Transcript

  1. ࿩͢͜ͱ • Active Job • Global ID • Adequate Record

    • Web Console • Foreign key support • Default Host for rails server
  2. Global ID͔Β Modelͷ৘ใΛऔಘͯ͠ΈΔ gid.app #=> "blog" ɾΞϓϦέʔγϣϯ໊ ɾϞσϧ໊ gid.model_name #=>

    "Post" ɾϞσϧΫϥε gid.model_class #=> Post(id: integer, title: string, published_at: datetime …) ɾID gid.model_id #=> "1"
  3. Rails 4.1 SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1

    LIMIT 1 SELECT "posts".* FROM "posts" WHERE "posts"."id" = 2 LIMIT 1 ৚݅ͷ஋͕มΘ͚ͬͨͩͳͷʹɺΫΤϦΩϟογϡ͞Εͯͳ͍
  4. Rails 4.2 SELECT "posts".* FROM "posts" WHERE "posts"."id" = ?

    LIMIT 1 [["id", 1]] SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 2]] Ωϟογϡ͞ΕͨΫΤϦʹ஋Λ౉͍ͯ͠Δ