-
Notifications
You must be signed in to change notification settings - Fork 1
Ui title #125
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
base: integration
Are you sure you want to change the base?
Ui title #125
Conversation
<div class="container-fluid" style="background-color: steelblue"> | ||
<%# if can?(:manage, @game) %> | ||
<% if user_is_admin? || | ||
( user_is_dev? && @game.user_id == current_user.id) %> |
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.
This is best put in ability.rb
file.
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 have a ticket to refactor all of the custom permissions methods out and use CanCanCan. Don't worry about it for this ticket. There's a lot of this to change in the entire app.
( user_is_dev? && @game.user_id == current_user.id) %> | ||
<div class="radiolist"> | ||
<%= simple_form_for(@game) do |f| %> | ||
<%= f.error_notification %> |
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.
Please indent this form properly.
<%= f.button :submit, Game::STATE_APPROVE, value: "Approve Game" %> | ||
<% end %> | ||
<% if @game.may_reject? %> | ||
<%= f.button :submit, Game::STATE_REJECT, value: "Reject Game" %> |
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.
Good job on using constant here!
|
||
<div> | ||
<p> | ||
<%= link_to "Download Pdf", game_review_path(@game.id), class:"btn btn-default" %> |
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.
You may be able to use @game
instead of @game.id
No description provided.