-
-
Save paulcsmith/5b6fe1dd7d138669a410f7f704d64283 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Users::IndexPage < MainLayout | |
needs users : UserQuery | |
def content | |
render_new_user_button | |
render_users_list | |
end | |
def render_new_user_button | |
link "New User", to: Users::New | |
end | |
def render_users_list | |
ul do | |
@users.each do |user| | |
li do | |
link user.name, to: Users::Show.with(user) | |
text " - " | |
text user.age || "no age given" | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment