Hello everyone,

I have a little problem, since I have change my route from resources to
resource. My files look like:

# config/routes.rb
ActionController::Routing::Routes.draw do |map|
  map.resource :system
end

# app/controllers/systems_controller.rb
class SystemsController < ApplicationController
  def new
    @system = System.new
  end
end

# app/views/systems/new.html.erb
<% form_for @system do |f| %>
<%= f.error_messages %>

And here is my error message:

NoMethodError in Systems#new

Showing app/views/systems/new.html.erb where line #1 raised:

undefined method `systems_path' for #<ActionView::Base:0x3459fe0>
Extracted source (around line #1):

1: <% form_for @system do |f| %>
2: <%= f.error_messages %>
3:
4: <dl>
RAILS_ROOT: /Users/pulu/Sites/test

Do you think I get an error in new.html.erb?

Thanks
-- 
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