タケユー・ウェブ日報

Ruby on Rails や Flutter といったWeb・モバイルアプリ技術を武器にお客様のビジネス立ち上げを支援する、タケユー・ウェブ株式会社の技術ブログです。

2014-12-26から1日間の記事一覧

Rails + Grape + Rspec でサブドメイン(constraints)のテストを行う時は integration_session.host= を使う

問題 Rails.application.routes.draw do constraints subdomain: /^api/ do mount Api::HogeApi => '/hoge' mount Api::FugaApi => '/fuga' end constraints subdomain: /^(?!api)/ do # non API routes end こんな感じのとき、Grapeのドキュメントにあるよ…