Skip to content

Commit 6e7f9c9

Browse files
committed
support questions now go in support
1 parent eeb18d7 commit 6e7f9c9

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

app/controllers/questions_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def edit_resource_path
5151
end
5252

5353
def set_support
54-
@support = request.env['PATH_INFO'].include?('support')
54+
@support = request.env['PATH_INFO'].include?('support') || params[:support]
5555
if @support && params[:question]
5656
params[:question][:support] = true
5757
end

app/views/questions/_form.html.haml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
.inputs
55
= f.input :title, :hint => "What's your question?"
6+
- if @support
7+
= f.hidden_field :support, :value => true
68
= f.input :description, :as => :text,
79
:hint => "Provide some details about your problem to help diagnose it You can format your input with <a href=\"http://daringfireball.net/projects/markdown/\">Markdown</a>".html_safe
810

app/views/shared/_ask.html.haml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
%h2 Have A Question?
33
%p Ask away! No question is too big or too small.
44
- if current_user
5-
= link_to "Ask a Question", new_question_path, :class => "btn success"
5+
- if @support
6+
= link_to "Ask a Question", new_question_path(:support => true), :class => "btn success"
7+
- else
8+
= link_to "Ask a Question", new_question_path, :class => "btn success"
69
- else
710
%p Log in to ask a question
8-
= link_to "Log In", login_path, :class => "btn success"
11+
= link_to "Log In", login_path, :class => "btn success"

0 commit comments

Comments
 (0)