サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
ノーベル賞
brainspec.com
In computer programming, named parameters or keyword arguments refer to a computer language’s support for function calls that clearly state the name of each parameter within the function call itself. © Wikipedia Right now (I mean in Ruby <= 1.9.3) you can ‘emulate’ it with passing a hash as an argument to a method: 1 2 3 4 5 def foo(options = {}) puts "#{options[:bar]} #{options[:buz]}" end foo(ba
Rendering JSON is pretty easy in Rails: 1 render json: @statuses This works well if there are small number of records to be returned. But what happens when we need to return 10,000 records at once? Things slow down dramatically and the most time-consuming parts are JSON serialization and database operations. Include only required attributes The first obvious thing is generating JSON with only attr
このページを最初にブックマークしてみませんか?
『brainspec.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く