gemãä½ã£ã¦ããã¨è¤æ°ã®rubyã®ãã¼ã¸ã§ã³ãä¾ågemã®ãã¼ã¸ã§ã³ãã«ã¸ã¥ã¢ã«ã«çµã¿åããã¦ãã¹ãããããã¨ããã®ãããããã¨æãã¾ããããã¾ãããæ¹ãç¥ããã¦ããªãæ°ãããã®ã§ã¾ã¨ãã¦ã¿ã¾ã ä»åã®ã¨ã³ããªã®ãµã³ãã«ããã¸ã§ã¯ã github.com æ¸è°·.rb[:20150520] ã®LTè³æ gemã®è¤æ°ãã¼ã¸ã§ã³ã«ã¸ã¥ã¢ã«ãã¹ã #shibuyarb from Go Sueyoshi (a.k.a sue445) æåã«ã¾ã¨ã Travis CI使ãã®ããã£ã¡ã楽ã ã»ããã¢ãã bundle gem ã³ãã³ãã§ãã¹ããçæ $ bundle gem multiple_version_test_sample -t --mit Creating gem 'multiple_version_test_sample'... create multiple_version_test_s
æè¿ã«ãªã£ã¦ç¥ã£ã Railsã®ä¾¿å©ãªã¡ã½ãããç´¹ä»ãããã¨æãã¾ãã pluck http://api.rubyonrails.org/classes/ActiveRecord/Calculations.html#method-i-pluck User.select(:id).where("age >= ?", 20).map(&:id) ãããªã³ã¼ãã User.where("age >= ?", 20).pluck(:id) ãããªãã¾ã Rails3ç³»ã§ã¯æå®ã§ããã«ã©ã ã¯ã²ã¨ã¤ã ãã§ããããRails4ããè¤æ°ã«ã©ã ãæå®ã§ããããã«ãªãã¾ããã User.where("age >= ?", 20).pluck(:id, :name) #=> [[1, '太é'], [2, 'è±å'], [3, 'äºé']] Rails3ç³»ã§ãmultipluck ã¨ããgemã使ãã°åããã¨ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}