meldung bleibt weiterhin ;-(

 

NoMethodError in BooksController#index You have a nil object when you didn't 
expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
RAILS_ROOT: C:/FORCE-~1/INSTAN~1/rails_apps/books_with_simple_data

Application Trace | Framework Trace | Full Trace 
app/controllers/books_controller.rb:10:in `index'
 

 

 

meine view hab ich gändert un :

 

<% form_for :book do |f| %>

<p>

<label> :source </label><br>

<%=f.text_field :source %>

</p>

<p>

<label>:depth </label><br>

<%= f.text_field :depth %>

</p>

<p>

<label>:destination </label><br>

<%= f.text_field :destination %>

</p>

<p>

<label>:dest_space </label><br>

<%= f.text_field :dest_space %>

</p>

<p>

<label>:parentId </label><br><br>

<%= f.text_field :parentId %>

</p>

<p>

<%= submit_tag "Create" %>

</p>

 

<% end %>

<%= @source %>

 
 
mein controller :
 
class BooksController < ApplicationController
def index
  
require 'little_helpers_spezial'
#confluence = Confluence::Server.new("https://spoi.telekom.de/info";)
#confluence.login(Einloggen_spezial::X_login, Einloggen_spezial::X_pwd)

@source = params[:book][:source]
#...@depth = params[:books][:depth]

#x = Little_Helpers_spezial.make_ready_for_export(confluence, source , depth)
 
#...@destination = params[:book][:destination]
#...@dest_space = params[:book][:dest_space]
#...@parentid = params[:book][:parentId]

#Little_Helpers_spezial.save(confluence, x, destination, dest_space,parentId)

end
end
 

From: ro...@sladeczek.de
To: rubyonrails-ug@headflash.com
Date: Mon, 12 Oct 2009 22:11:55 +0200
Subject: Re: [Rubyonrails-ug] controller problem !

Dein Formular ist verkehrt. Mach aus dem :books ein :book
und benenne die restlichen books in f um.


in etwa so:


<% form_for :book , :url => { :action => 'index' } do |f| %>
<p>
<label> :source </label><br>
<%= f.text_field :source %>
</p>
<p>
<label>:depth </label><br>
<%= f.text_field :depth %>
</p>
<p>
<label>:destination </label><br>
<%= f.text_field :destination %>
</p>
<p>
<label>:dest_space </label><br>
<%= f.text_field :dest_space %>
</p>
<p>
<label>:parentId </label><br><br>
<%= f.text_field :parentId %>
</p>
<p>
<%= f.submit_tag "Create" %>


Gruss, 
Roman





Am 12.10.2009 um 22:00 schrieb player man:
<% form_for :books , :url => { :action => 'index' } do |books| %>
<p>
<label> :source </label><br>
<%= books.text_field :source %>
</p>
<p>
<label>:depth </label><br>
<%= books.text_field :depth %>
</p>
<p>
<label>:destination </label><br>
<%= books.text_field :destination %>
</p>
<p>
<label>:dest_space </label><br>
<%= books.text_field :dest_space %>
</p>
<p>
<label>:parentId </label><br><br>
<%= books.text_field :parentId %>
</p>
<p>
<%= submit_tag "Create" %>
                                          
_________________________________________________________________
Windows Live Hotmail: Your friends can get your Facebook updates, right from 
Hotmail®.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009
_______________________________________________
rubyonrails-ug mailing list
rubyonrails-ug@headflash.com
http://mailman.headflash.com/listinfo/rubyonrails-ug

Antwort per Email an