Welcome to the Treehouse Community
Looking to learn something new?
Matt Horan138 Points
Rails basic form issue
I am attempting to create a basic form within rails. I have the form running and can fill in details and submit data, which I can see in the terminal log is being saved. The issue I am having is when I attempt to display the data saved I get the following message " "Couldn't find Editprofile with 'id'=show" and it points to an issue with my show controller.
class EditprofilesController < ApplicationController
def index @editprofile = Editprofile.all end def show @editprofile = Editprofile.find (params[:id]) end def new @editprofile = Editprofile.new end def create @editprofile = Editprofile.new(editprofile_params) if @editprofile.save redirect_to editprofiles_url else render 'new' end end def editprofile_params params.require(:editprofile).permit(:image,:fristname, :lastname, :country,) end
I just can not work out what the issue is. Any help would be greatly appreciated.