Thanks for all answer I don't use the scaffold for that app

here is my table CONTROLLER

class TableController < ApplicationController

  def index
    @basket  = Basket.find(:all)
    @apple = Apple.find(:all)
  end

  def new
    @table = Table.new
  end
end

here my MODEL

class Table < ActiveRecord::Base

belongs_to :apples
belongs_to :baskets

end

maybe above you can see a logic error? or syntax error?

thanks anyway,

C

Colin Law wrote in post #1052589:
> On 21 March 2012 00:27, Cluter Vipic <li...@ruby-forum.com> wrote:
>> end
>>
>> true}) %>
>> meanwhile if I have the follow code
>>
>> <% end %>
>>
>> the page show the follow error page
>>
>> ////////////
>> undefined method `model_name' for NilClass:Class
>
> That means that @table is nil.  This form cannot work if @table has
> not been setup to be an object of appropriate type.  :table is a
> symbol used here to represent a type of object, @table is a variable
> that must have been setup in the controller in order to use it in the
> view.
>
> Colin.
>
> Colin
>
>>
>>
>> --
>> 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@googlegroups.com.
>> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
>> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>
>
> --
> gplus.to/clanlaw

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to