Home>
I think that it will be created, but I get an error statement saying Did you mean? Baggage_path, but I feel that this is a problem because I want to save it in the database in the first place.
admin/baggages/new.html.haml
.wrapper
.disply
= form_for @baggage do | f |
.baggage
.baggage__box
% span
Luggage type
= f.select: kind, [["Namamono", "Namamono"], ["Chilled", "Chilled"], ["Frozen", "Frozen"], ["Other", "Other" ]], include_blank: "Please select"
.baggage__box
% span
Storage period
= f.text_field: storage_period, class: "baggage_text", placeholder:'Example) 7'
% span days
.baggage__box
% span
Tracking number
= f.text_field: code, class: "baggage_text", placeholder: '123456789012'
-# = f.hidden_field: user_id,: value =>"# {user_session}"
= f.hidden_field: user_id
= f.submit'SEND', class: "baggage__send"
admin/baggages.controller.rb
class Admin :: BaggagesController
-
Answer # 1
-
Answer # 2
pages_show_path (@baggage)
Isn't the part marked with the following?
baggage_path (@baggage)
Related articles
- ruby - [rails] about the error that occurs when deleting likes (routing error)
- ruby - when i try to update rails, i get a routing error
- ruby - the error in rails g migration cannot be resolved
- ruby on rails - rails error (logged out users see links that are no longer valid)
- ruby on rails - test code causes error when product information input is successful
- ruby on rails - error when implementing rails6 follow function
- ruby on rails - pg :: datatypemismatch error when doing heroku run rails db: migrate
- ruby on rails - i want to download a file with rails, s3 and carrierwave, but i get an error
- ruby on rails - when i run rails, i get an error related to webpacker
- ruby on rails 6 - i want to solve the error that occurred while implementing the product listing function
- ruby - an error occurs when building a rails 6 environment with docker
- ruby on rails 6 - when i press new user registration, i get an error of no route matches [get] "/ users"
- ruby on rails 6 - about rails error "wrong number of arguments (given 1, expected 0)"
- ruby on rails 6 - error resolution for no route matches [delete]
- error in building environment of ruby on rails
- ruby on rails - nomethoderror in itemscontroller # new error
- ruby on rails 6 - [error] uninitialized constant user (call'userconnection' to establish a connection) :: image
- ruby on rails - i want to put what i posted on the show page, but it's a blank page it's not an error
- ruby on rails - i get a template is missing error in render
Trends
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- javascript - how to check if an element exists in puppeteer
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file
- i want to call a child component method from a parent in vuejs
- python 3x - typeerror: 'method' object is not subscriptable
In conclusion, it was because there was no create in the routing references: baggages part.
I made two, one for the administrator and one for the general, but the administrator did not specify it, but the general one specified only new and show.
The description is specified to save in the database with form_for.
In other words, "I'm writing to process the create action, but I haven't set the routing in the first place."
After that, if the controller file is the same as the administrator and general, the administrator can register the one associated with the general user (for some reason, there was no error in the browser, only the terminal got an error).