I am absolutely and completely new to rails, so the answer is probably very simple. Here:
My page generates this error
NoMethodError in Tasks # new
Showing app / views / tasks / new.erb where line # 3 raised:
undefined method `tasks_path 'for #
Here is a view:
<% form_for(@task) do |f| %> <%= f.error_messages %> <%= f.label :description %>: <%= f.text_field :description %><br /> <%= f.label :priority %>: <%= collection_select(:news, :priority_id, Priority.find(:all), :id, :description) %><br /> <%= f.submit "Add Task" %> <% end %>
Controller:
class TasksController < ApplicationController def index @all_tasks = Task.find(:all, :order => :id) end def new @task = Task.new end ...(more)
and model:
I do not see a problem, but, as I said, I still do not know. Thanks!
class Task < ActiveRecord::Base validates_presence_of :description belongs_to :priority has_and_belongs_to_many :staff has_and_belongs_to_many :catagory end
source share