LoginSignup
0
0

More than 3 years have passed since last update.

Railsでpostする時、controllerを指定するには?

Posted at

ApplicationHelperで以下のようなコードを書いており、これをUserControllerから呼び出しても、SessionControllerのcreateを呼ぶようにしたいのですが、Controllerの指定の仕方が分かりません。

def log_in_as(user, password: 'password', remember_me: '1')
    post :create, params: { session: {解りづらくなるので引数は省略} }
end

こちらはRails5.1を使っております

よろしくお願いします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0