Skip to main content
adicionou 68 caracteres ao conteúdo
Fonte Link

def new @section = Section.new({:page_id => @page.id, :name => "Default"}) @pages = @page.subjectSou iniciante em ruby, e tive este erro.pages.sorted @section_count = Section.count + 1 end

 def new
    @section = Section.new({:page_id => @page.id, :name => "Default"})
    @pages = @page.subject.pages.sorted
    @section_count = Section.count + 1
  end

It says thats on line to. How do i solve this problemDiz que o problema e na linha dois, Alguem me consegue ajudar?

def new @section = Section.new({:page_id => @page.id, :name => "Default"}) @pages = @page.subject.pages.sorted @section_count = Section.count + 1 end

It says thats on line to. How do i solve this problem?

Sou iniciante em ruby, e tive este erro...

 def new
    @section = Section.new({:page_id => @page.id, :name => "Default"})
    @pages = @page.subject.pages.sorted
    @section_count = Section.count + 1
  end

Diz que o problema e na linha dois, Alguem me consegue ajudar?

Fonte Link

undefined method `id' for nil:NilClass

def new @section = Section.new({:page_id => @page.id, :name => "Default"}) @pages = @page.subject.pages.sorted @section_count = Section.count + 1 end

It says thats on line to. How do i solve this problem?