Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
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.