Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Dec 1, 2016

No description provided.

<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) %>
Copy link
Contributor

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.

Copy link
Contributor

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 %>
Copy link
Contributor

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" %>
Copy link
Contributor

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" %>
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants