You are not logged in.

#1 2014-12-13 11:55:44

LordOfInsomnia
Member
Registered: 2011-10-13
Posts: 69

rails newbie "First argument in form cannot contain nil or be empty"

I am learning ruby on rails, and I have difficulties with syntax.

I got this error

<code>First argument in form cannot contain nil or be empty</code>

I have searched for solution. Here and google it. Could not find any to my problem...

<code>
class PersonalsController < ApplicationController
   def index

   end
   def create   
      @personal = Personal.new
   end
   def new
      @personal = Personal.new     
   end
   def show
      @personal = Personal.find([:id])
   end
end       
</code>

index.html.erb
<code>
<%= form_for @personal do |f| %>
  <%= f.label :title %><br>
  <%= f.text_field :title %>
  <%= f.submit %> 
<% end %>
</code>

Offline

Board footer

Powered by FluxBB