title: Storing user input value in controller
body: <p>I have a controller named Welcome with view called index. </p>
  
  <p>In my index view i have created a small form as such.</p>
  
  <pre><code>&lt;%= form_for :location do |f| %&gt;
  
      &lt;%= f.label :Longitude %&gt;&lt;br&gt;
  
      &lt;%= f.text_field :integer %&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;%= f.label :Latitude %&gt;&lt;br&gt;
      &lt;%= f.text_field :integer %&gt;
  
  
    &lt;p&gt;
      &lt;%= f.submit %&gt;
    &lt;/p&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>In this form the user can enter some integer value for longitude and latitude. Once the user enters value for longitude and latitude. They click submit. Upon submit i would like to store these values in my controller. So i am using the following method where i have two instance variables taking values from the form.</p>
  
  <pre><code>def index
      @long = params[:longitude]
      @lat = params[:latitude]
    end
  </code></pre>
  
  <p>In my routes.rb I have   </p>
  
  <pre><code>get 'welcome/index'
    post 'welcome/index'
  </code></pre>
  
  <p>Please tell me where i went wrong. Also if someone can suggest a better way of doing this also i would appreciate it i am new to rails and i want to learn the correct way of doing things so i don't create bad habits early on. </p>