

<header class="page-header col-12">

  <% if session[:current_user] %>
  <%= button_to "Create New Question", {method: :get}, { class: "new_question" }%>
  <% end %>

</header>

<% if session[:current_user] %>
  <p id="notice"><%= notice %></p>
  <div id='new_question_modal' class='modal'>
    <%= render 'form' %>
  </div>
<% else %>
  <div id='login_modal' class='modal'>
    <%= render '/login' %>
  </div>

  <div id='signup_modal' class='modal'>
    <%= render 'users/new' %>
  </div>
<% end %>
<div class="col-12">
  <ol class="thumb-grid group clearfix">

    <% @questions.each do |question| %>
      <li>
        <%= link_to question_path(question) do %>
          <img src='<%= question.image_path %>' class="thumb" >
        <% end %>
      </li>
    <% end %>

  </ol>
</div>

<header class="page-header col-12">

  <% if session[:current_user] %>
  <%= button_to "Create New Question", {method: :get}, { class: "new_question_button" }%>
  <% end %>

</header>

<% if session[:current_user] %>
  <p id="notice"><%= notice %></p>
  <div id='new_question_modal' class='modal'>
    <%= render 'form' %>
  </div>
<% else %>
  <div id='login_modal' class='modal'>
    <%= render '/login' %>
  </div>

  <div id='signup_modal' class='modal'>
    <%= render 'users/new' %>
  </div>
<% end %>
<div class="col-12">
  <ol class="thumb-grid group clearfix">

    <% @questions.each do |question| %>
      <li>
        <%= link_to question_path(question) do %>
          <img src='<%= question.image_path %>' class="thumb" >
        <% end %>
      </li>
    <% end %>

  </ol>
</div>

Edit Button For Easier Ajax Calling
Edit Button For Easier Ajax Calling
