1月の配列から特定の日付のレコードのみを取得したいのですが、
] pry(#<Users::ReceptionsMonthController>)>[:receptions][:date_of_use]["2021-04-07"] TypeError: no implicit conversion of Symbol into Integer
が出てしまいます。
恐れ入りますが、解決策を教えていただけますでしょうか。
宜しくお願い致します。
] pry(#<Users::ReceptionsMonthController>)> params[:receptions] => [<ActionController::Parameters {"date_of_use"=>"2021-04-01"} permitted: false>, <ActionController::Parameters {"date_of_use"=>"2021-04-02"} permitted: false>, <ActionController::Parameters {"date_of_use"=>"2021-04-03"} permitted: false>, <ActionController::Parameters {"date_of_use"=>"2021-04-04"} permitted: false>, <ActionController::Parameters {"date_of_use"=>"2021-04-05"} permitted: false>, <ActionController::Parameters {"date_of_use"=>"2021-04-06", "request"=>"0"} permitted: false>, ⬇︎この日のレコードを取得したい <ActionController::Parameters {"date_of_use"=>"2021-04-07", "start_time"=>"12:00", "start_place"=>"1", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"16:00", "end_place"=>"1", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-08", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-09", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-10", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-11", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-12", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-13", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-14", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-15", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-16", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-17", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-18", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-19", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-20", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-21", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"start_transfer"=>"true", "end_time"=>"", "end_place"=>"", "end_transfer"=>"false"} permitted: false>, <ActionController::Parameters {"end_transfer"=>"true", "event"=>"0", "remarks"=>"", "request"=>"0", "date_of_use"=>"2021-04-22", "start_time"=>"", "start_place"=>"", "start_transfer"=>"false"} permitted: false>,
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/04/10 04:22