<p>I'm new to ruby and started to create my *nd toy app.
I:</p>

<ol>
<li>Created controller 'questions'</li>
<li>Created model 'question'</li>
<li>Created controller action 'new'</li>
<li>Added 'New.html.erb' file</li>
</ol>

<p>in erb file I use <code>form_for</code> helper and and <code>new</code> controller action where I instantiate 
<code>@question</code> instance variable.
When I try to run this I get <code>'undefined method: questions_path for #&lt;ActionView::Base:0x5be5e24&gt;'</code> error.
Below is my new.html.erb:</p>

<pre><code>&lt;%form_for @question do |f| %&gt;
   &lt;%=f.text_field :title %&gt;
&lt;%end%&gt;    
</code></pre>

<p>Please advise how to fix this and also help me with aliasing this controller action.
What I mean is I would like to type <a href="http://mysite/questions/ask" rel="nofollow noreferrer">http://mysite/questions/ask</a>, instead of /questions/create</p>

In
```
config/routes.rb
```
you will need to add:
```
```
map.resources :questions
```
```
to fix the undefined method questions_path problem.
One way to get
```
/questions/ask
```
is to modify
```
routes.rb
```
like so:
```
```
map.ask_question '/questions/ask', :controller => 'questions', :action => 'create'
```
```
which will give you
```
ask_question_path
```
which you can reference in your code.