06 Dec '17, 4pm

Rails 5.2 implements fetch_values for HashWithIndifferentAccess

This blog is part of our Rails 5.2 series . Ruby 2.3 added fetch_values method to hash . By using fetch_values we are able to get values for multiple keys in a hash. capitals = { usa: "Washington DC", china: "Beijing", india: "New Delhi", australia: "Canberra" } capitals.fetch_values(:usa, :india) #=> ["Washington DC", "New Delhi"] capitals.fetch_values(:usa, :spain) { |country| "N/A" } #=> ["Washington DC", "N/A"] Rails 5.2 introduces method fetch_values on HashWithIndifferentAccess . We’ll hence be able to fetch values of multiple keys on any instance of HashWithIndifferentAccess class. capitals = HashWithIndifferentAccess.new capitals[:usa] = "Washington DC" capitals[:china] = "Beijing" capitals.fetch_values("usa", "china") #=> ["Washington DC", "Beijing"] capitals.fetch_values("usa", "spain") { |country| "N/A" } #=> ["Washington DC", "N/A"]

Full article: http://blog.bigbinary.com/2017/12/06/rails-5-2-implements...

Tweets

Rails 5.2を待たずに今すぐActiveStorageを使ってみた(翻訳) https://t.co/XBtMpN9nXo

Rails 5.2を待たずに今すぐActiveStorageを使ってみた(翻訳) https:...

techracho.bpsinc.jp 05 Dec '17, 11pm

# app/controllers/posts_controller.rb class PostsController < ApplicationController # postのフォームをここで表示する def index @post = ...

This Week in Rails: Rails 5.2 beta, new Postgre...

weblog.rubyonrails.org 03 Dec '17, 11pm

Hello everyone! This is Roque bringing you the latest news from the Rails world. Rails 5.2.0 beta released

Rails 5.2.0 beta released

weblog.rubyonrails.org 07 Dec '17, 9pm

Hello everyone! This is Roque bringing you the latest news from the Rails world. Rails 5.2.0 beta released

My 1st @InfluxDB blog post!

influxdata.com 08 Dec '17, 10pm

As the internet and some of my coworkers soon informed me, part of the enchanted forest pictured above is Telegraf , which...

Ateam Hikkoshi Samurai Inc. Advent Calendar HTTP/2 サーバープッシュ : H2OとRuby on Rails 5.2beta、HTTP 103 EarlyHin... https://t.co/QyKsRz7VZg

Ateam Hikkoshi Samurai Inc. Advent Calendar HTT...

qiita.com 05 Dec '17, 7am

$ docker-compose run --rm web bin/rails s -h Usage: rails server [puma, thin etc] [options] Options: -p, [--port=port] # R...