Home>
This implementation uses haml.
Registered users are received at "@ group.users".
It is a program that implements so that the names of users registered in the group are displayed in a list in left-header__members.
I implemented it within the range that I can understand now.
I used each to register multiple users, but could you teach me the exact implementation method ahead of time?
If there are three users registered in the group, Tanaka, Sato, and Suzuki, the following image will be displayed on the browser.
If there is any incomplete information, please let me know.
Current implementation code.left-header__members
Member:
% ul.
@ group.users.each
% li = user.name
`` `
-
Answer # 1
Related articles
- ruby on rails - i get an error in a program that changes over time
- ruby on rails - view all tweets of the users you are following in chronological order
- ruby on rails - rails error (logged out users see links that are no longer valid)
- ruby on rails - addition of like function to users to flea market apps
- ruby - the last db setting doesn't work when deploying rails app on aws
- [ruby on rails] how to write when getting a model nested in multiple stages with includes
- ruby on rails - i want to change from the state where only one posted image is displayed to the state where two posted images ar
- ruby on rails uninitialized constant error
- ruby on rails - i want to deploy to aws ec2 server
- ruby on rails - i want to avoid displaying duplicate data for each shop
- ruby - i want to display specific columns in rails in descending order of numbers
- ruby on rails - i installed ruby with rbenv, but the version does not change
- ruby on rails - when i run rails s, i get
- ruby on rails 5 - scope by specifying conditions for parent-child relationship
- i want to convert wav to mp3 with ruby on rails and pass it to active strage
- ruby on rails 6 - about rails routing error no route matches [get] "/"
- ruby - about implementation of tag function in rails
- ruby on rails - i want to display the posted images in a random order (get information from the record)
- about the program that sorts and displays command line arguments
- ruby on rails - [rails] i'm implementing a search function using form_with, but i'm having trouble with the search results not b
Related questions
- html - i want to set the conditions to be displayed in collection_check_boxes
- ruby on rails - how to transition from the top page
- ruby on rails - [rails] how to specify the number of date_select to be displayed
- css - display the list of users registered in the group
- ruby on rails - i want to display the number of people in the group
- ruby - i get an error when i run rails db: seed
- ruby on rails - i want to post an image by dragging and dropping
- html - i want to log in as an administrator user and register by linking general users and luggage
- ruby on rails - when i run rails s, i get
- ruby - i get an error saying undefined method `resize_to_limit'for
Are there any problems?
I got the impression that there was no problem in operation.
If that is not the case, and if you are in trouble because something is not possible, I think that if you do not state that fact, you will not receive an answer.
To explain just how to modify the implementation code more generally, if you use ul, it will be common to do the following:
Important pointsBy doing so, the li tag fits in the ul tag, so the original movement of ul and li will be utilized.
In haml, pay special attention to the number of indents
When using ruby's method in haml but not displaying it on the screen, add '-' and a space at the beginning of the line
Useful articlesHow to write Haml
Bonus
If you want to maintain the appearance you put on the image, I think that it will be as follows.
I'm not really sure if I can put a space after the ',', so I'd like to wait for another answer ...
I think that it can be done using helper or something, but I didn't list it because I felt that the level had not yet been reached.