Home>
File currently in error
The description of the baggage_params method, the description of the new action and the description of the create action may be those using build.
class Admin :: BaggagesController</pre>
<strong>Transition source file (admin/baggages/index.html.haml)</strong>
<pre><code>= search_form_for @search, url: admin_baggages_url do | f |
= f.label: name_cont, "Enter your name"
= f.search_field: name_cont
= f.submit "search"
.table
.thead
% tr
% th = sort_link (@search,: name) #result part and link
% th = sort_link (@search,: address)
.tbody
[email protected] users.each do | user | #controller "@users = @ search.result" "returns" what you searched for
% tr
-#% td = link_to user.name, new_admin_baggage_url (@q,:'q [user_id_eq]'=>"# {user.id}")
% td = user.name
% td = user.address
% td = link_to "New", new_admin_baggage_url (@q,:'q [user_id_eq]'=>"# {user.id}")
Transition destination file (admin/baggages/new.html.haml)
= f.hidden_field: user_id,: value =>In the line @q (params [: id]), the value cannot be passed to user_id and it is sent empty.
.wrapper
.disply
= form_for @baggage, url: admin_baggages_path do | f |
.baggage
.baggage__box
% span
Luggage type
= f.select: type, [["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 =>@q (params [: id])<-No value passed in this part
= f.submit'SEND', class: "baggage__send"
I put a<-mark next to the code where it was clearly not implemented.
-
Answer # 1
Related articles
- ruby on rails - [rails] i want to implement a filtering function and display the corresponding items on the list screen
- ruby on rails - i want to implement a login function using devise
- ruby on rails - i want to implement a report function, but i get an actioncontroller :: urlgenerationerror
- ruby on rails - how to implement a sort function by the value of the statistical column that aggregates the values of related
- [ruby on rails] i want to implement a follow function, but the like button is not displayed in the view
- ruby on rails - i want to implement a function that returns a line bot stamp
- ruby on rails - i want to implement a function (destroy action) that can delete posted messages, but i am getting an active reco
- ruby on rails - i can't implement the rails like function
- ruby - i want to implement a like function
- ruby on rails - comment posting function actioncontroller :: urlgenerationerror
- ruby - about implementation of tag function in rails
- ruby on rails - addition of like function to users to flea market apps
- ruby on rails - [rails] i'm implementing a search function using form_with, but i'm having trouble with the search results not b
- ruby - [rails] the cart function cannot get the cart id associated with the user
- php - i want to implement a function to log in to a user account with an administrator account without a password
- ruby on rails - cart function routing error cannot be resolved
- ruby - i'd like to implement a genre-specific display function in [rails], but i'm having trouble as i expected
- ruby on rails - with the product listing function, an error message appears only for the product description
- ruby - how to implement the search function
Trends
- python - you may need to restart the kernel to use updated packages error
- dart - flutter: the instance member'stars' can't be accessed in an initializer 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
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file
- i want to check the type of a shell script variable
- i want to call a child component method from a parent in vuejs
Separate user types,
current_user
When you are an administrator, it is OK if you search the luggage of general usersAs an image
Is it like that?