title: Managing GET and POST at the same action on Rails 4 problems
body: <p>I have this in my routes file:</p>
  
  <pre><code>match "/register/:invitation_code", to: "users/invites#register", as: "register_by_invite", via: [:get, :post]
  </code></pre>
  
  <p>I have the following controller structure:</p>
  
  <ul>
  <li>users/invites_controller.rb</li>
  </ul>
  
  <p>And this is my controller's code:</p>
  
  <pre><code>class Users::InvitesController &lt; ApplicationController
  
    def GET_register
      @invite = Invite.find_by_invite_code(params[:invitation_code])
    end
  
    def POST_register
    end
  
  end
  </code></pre>
  
  <p>My view structure:</p>
  
  <ul>
  <li>views/users/invites/register.html.erb</li>
  </ul>
  
  <p>For some reason, all the instances (@invite...) are not being sent to the view, that's really weird and I'm stuck with this the whole day.</p>