Skip to content

Instantly share code, notes, and snippets.

View yutackall's full-sized avatar

Yuta Takuman yutackall

  • F.F.B Inc.
  • Tokyo
View GitHub Profile
@yutackall
yutackall / users_controller.rb
Created February 6, 2015 08:17
Rails で 指定した ID 順に取得する ref: http://qiita.com/yutackall/items/34cf4f1dee10aa10821a
class UsersController < ApplicationController
# GET /users/ids
def ids
@users = User.all.order(accessced_at: :desc)
render json: @users.pluck(:id)
end
# GET /users/lookup?ids[]=1&ids[]=2
def lookup
@yutackall
yutackall / reserved.xml
Created February 6, 2015 05:23
Rails から twilio を使って電話発信してみた ( SMS は対象外ね ) ref: http://qiita.com/yutackall/items/8d3b3f5dd98cd136891f
<Response>
<Pause length="2"/>
<Say voice="woman" language="ja-jp">こちらは、ホゲホゲです。ユーザー様より予約がはいりました。管理画面から予約の確認をお願いします。</Say>
</Response>
@yutackall
yutackall / file0.rb
Last active August 29, 2015 14:07
StrongParameters で配列の中身のパラメータチェック ref: http://qiita.com/yutackall/items/51eabf95b2dbdbe71897
params.permit(:users => [])