Thanks Hasson, cousine! That fixed my problem. I appreciate the quick
responses.

Michael



On Sep 6, 5:04 pm, cousine <[email protected]> wrote:
> Hello Micheal,
>
> when using formfor, the returned parameter's name is the same as the
> model's name, but in your create action you are retrieving "meetmes"
> instead of "meetme" from the parameters (which is nil) so the new
> method would instantiate an empty model and then try to save it.
>
> try this create action instead of the one you have:
>
> def create
>     @meetme = Meetme.new(params[:meetme]) # notice this line
>
>     respond_to do |format|
>       if @meetme.save
>         flash[:notice] = 'Meetmes was successfully created.'
>         format.html { redirect_to(@meetme) }
>         format.xml  { render :xml => @meetme, :status
> => :created, :location => @meetme }
>       else
>         format.html { render :action => "new" }
>         format.xml  { render :xml => @meetme.errors, :status
> => :unprocessable_entity }
>       end
>     end
> end
>
> Cheers..
>
> On Sep 7, 1:59 am, Michael R <[email protected]> wrote:
>
>
>
> > I have an odd issue that I am having a difficult time solving.
>
> > When I attempt to create or edit data in my rails app; it INSERTsNULL
> > values instead of the values I eintered in the form. Same with editing
> > the data; it doesn't UPDATE the table with values I entered. Via the
> > console, I can see that it recieved the values but the SQL statements
> > showNULLvalues.
>
> > I don't know where my problem lies. Here's my code below. Any help
> > would be greatly appreciated. Thanks!
>
> > Console errorhttp://dpaste.com/90452/
>
> > meetmes_controller.rbhttp://dpaste.com/90453/
>
> > meetme.rb Model (nothing in here)http://dpaste.com/90454/
>
> > meetme view (new)http://dpaste.com/90455/
>
> > meetme view (edit)http://dpaste.com/90456/
>
> > Michael
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to