諸行無常

IT色々お勉強中のブログ

2018-02-01から1ヶ月間の記事一覧

rubocopとの奮闘記録 途中

Use a guard clause instead of wrapping the code inside a conditional expression. 条件分岐のネストが深くなるのはダメ bad def hoge if boge? || kuzu? 'sine' end end good def hoge 'sine' if boge? || kuzu? end Don't use parentheses around the c…

Ruby on RailsによるJSON APIのシリアライズの高速化

英訳 Ruby on Railsアプリケーション向けの高速 JSON API gemのオープンソース・リリースを発表します。 Introduction 高速JSONAPIは、Active Model Serializer(AMS)が提供する主要な機能をすべて提供するとともに、 AMSよりも25倍高速というベンチマーク…

vueファイルの置き場所を設定

vueファイルの置き場所を設定 app/javascript/srcの位置を@で示せるようにする config/webpack/custom.js const utils = require('./utils') module.exports = { resolve: { extensions: ['.js', '.vue', '.json'], alias: { vue$: 'vue/dist/vue.esm.js', '…

本当にインスタンス変数ダメなの?

ameblo.jp Ruby on Railsでcontrollerがインスタンス変数を持つ理由 - Qiita techracho.bpsinc.jp qiita.com