This is what your config/routes.rb
should look like:
resources :resumes
This is the #create
method in your controller.
def create
@resume = Resume.new(params[:resume]) # if you are on rails 4 then you have to use strong params
if @resume.save
flash[:succes] = "Resume Saved!"
redirect_to resumes_path
else
flash[:error] = "Resume did not save."
redirect_to resumes_path
end
end
The #create
method is a post naturally. This resource is very helpful for understanding routes. http://guides.rubyonrails.org/routing.html. As to your question regarding the mash, I do think it has been answered here How to parse a Mash from LinkedIn to create a Ruby object.