Frederick Cheung wrote in post #995643:
> On Apr 28, 10:37pm, "David Mr." <[email protected]> wrote:
>> controller after hitting the submit button. Instead I get "waiting for
>> localhost" on the browser status and finally rails gives an error. If I
>> comment out "@search.save" under 'def create' in the controller and
>> instead render inline @search it shows '#' instead of the actual form
>> data. Any thoughts??
>
> What makes you so sure that the form data isn't being passed properly?
> To me it sounds like your model code is doing something lengthy and
> eventually times out (what is the error that occurs?)
>
> Fred

Thanks for responding.

Well, that could be the case.  I remembered last night that I had 
commented out parts of this section:

 def create
    @search = Search.new(params[:search])
   #  if @search.save
   #   flash[:notice] = "Successfully created @search."
   #   redirect_to @search
   #  else
   #   render :action => 'new'
   #  end
  end

Just to see if that was the cause of another error.  Here is the error 
that happens when it is not commented out:

NoMethodError in SearchesController#create

undefined method `each' for true:TrueClass

/home/brad/Documents/blogazer/app/models/search.rb:201:in 
`set_from_sources'
/home/brad/Documents/blogazer/app/models/search.rb:107:in `execute'
/home/brad/Documents/blogazer/app/models/search.rb:73:in `setup_data'
/home/brad/Documents/blogazer/app/controllers/searches_controller.rb:22:in 
`create'

Request

Parameters:

{"commit"=>"Create",
 "authenticity_token"=>"V4z2rM09NbCGGH7Kua/HGzhzybKXD1bjRQgKvdvwavc=",
 "search"=>{"setB"=>"linux",
 "project_id"=>"1",
 "notes"=>"test",
 "google"=>"0",
 "mwf"=>"0",
 "setAList"=>"2",
 "auto"=>"0",
 "atf"=>"0",
 "setA"=>"server",
 "setBList"=>"2"}}

-- 
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 [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