app/views/rostra/shared/_sidebar.html.erb in rostra-0.1.12 vs app/views/rostra/shared/_sidebar.html.erb in rostra-0.1.13
- old
+ new
@@ -1,12 +1,14 @@
<div id="sidebar">
<% if can_participate_in_rostra? %>
- <%= link_to 'Ask a question', new_question_path, class: "button" %>
+ <% unless current_rostra_page?('questions#new') || current_rostra_page?('questions#edit') %>
+ <%= link_to 'Ask a question', new_question_path, class: "button" %>
+ <% end %>
<% else %>
<%= link_to 'Login to ask a question', main_app_login_path, class: "button" %>
<% end %>
- <% if can_participate_in_rostra? && controller_name == 'questions' && action_name == 'show' %>
+ <% if can_participate_in_rostra? && current_rostra_page?('questions#show') %>
<%= render partial: 'rostra/shared/toggle_following_question_button', locals: { question: @question } %>
<% end %>
<h4>Trending questions</h4>
<ul id="trending_questions">