-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add view button for every displayed Bet in /bets #37
Conversation
<%= | ||
link_to bet, class: 'btn btn-secondary', role: 'button' do | ||
content_tag :i, class: 'fa fa-eye' do | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the do end
is needed here for your content tag as you aren't sending in anything for the block.
http://apidock.com/rails/ActionView/Helpers/TagHelper/content_tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
To use content_tag without a block you have to pass it a third argument though:
content_tag :i, nil, class: 'stuff'
In this case you shouldnt use content_tag. None of your values are dynamic. It would be more clear to write
<i class="stuff"></i>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it bombs without the do...end. Didn't know you could one line it with passing nil though, thanks!
Now, if you excuse me, I have 5 thousand other "content_tag"s to fix.
7c821cd
to
2a2b8de
Compare
12d9683
to
81f420c
Compare
Jenkins test this please |
jenkins test this please |
405cde9
to
5db032c
Compare
2a2b8de
to
bdae7a2
Compare
bdae7a2
to
26a724b
Compare
26a724b
to
92e6c13
Compare
92e6c13
to
baa0a80
Compare
This branch has merge conflicts. Please resolve them. |
baa0a80
to
9253769
Compare
app/views/bets/_bet.html.erb
Outdated
<td class="col-md-3"><%= bet.bet %></td> | ||
<td class="col-md-1"> | ||
<%= link_to bet, class: 'btn btn-secondary', role: 'button' do %> | ||
<div style="font-size: 0.8em;" class="text-center"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👎 Inline styles
9253769
to
161408d
Compare
The button takes the user to the appropriate Bet show page.
161408d
to
df3143b
Compare
Pivotal: https://www.pivotaltracker.com/story/show/141340981
Dependent on #60, #61, #62
The button takes the user to the appropriate Bet show page.