0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Railsのクエリ文字とparams

Posted at

今まで漠然と理解していたが整理のため記載

クエリパラメーター

http://example.com/line/latest_message?user_list=U2525

paramsのkeyであるuser_listにはU2525が入る

class Line::LatestMessageController < ApplicationController
  def index
    params[:user_list]) #params[:user_list] == U2525
  end
end

またinputタグのname属性の文字がURLのqueryのkeyになる

 <input type="text" name="user_list">
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?