I don''t know your view''s code, but looking at your
controller''s code...
maybe instead of params[:ad] you should use params[:adv] "maybe"
I''m just
guessing. you should send your view''s code
2010/8/20 Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
> I''m following an example in the "Head First Rails" book.
>
> Now, when I "create" a record, and then go to the table, I find
that a
> BLANK record is created also I enter field values.
>
> What may I be missing?
>
> This is how "advs_controller.rb" looks like:
>
> class AdvsController < ApplicationController
> def show
> @adv = Adv.find(params[:id])
> end
>
> def index
> @advs = Adv.find(:all)
> end
>
> def new
> @adv = Adv.new(params[:ad])
> end
>
> def create
> @adv = Adv.new(params[:ad])
> @adv.save
> end
> end
>
> Thanks.
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.