Topic: Undefined Method...
Please be patient... I'm not even sure I know enough about what I'm doing to explain the problem. I've never really done anything in Rails before.
I'm trying to develop a simple little changelog/todo list tracking application as a way to dive into rails and start learning. So, I've set up my databases and my rails app, created models and controler for my "projects" table. Everything works great, so I went back to add a little error handling in app/models/project.rb
class Project < ActiveRecord::Base
validates_uniqueness_of :project, :message => "This project already exists."
Seems simple enough, right? Only the problem is that now, whenever I try to create a new project, I get the following:
NoMethodError in Project#create
undefined method `project' for #<Project:0x405e72f8>
Validates_length_of didn't work, either, so I'm thinking that nothing I put in there's going to work and I have no clue why. If I take the validation check out, I can insert records all day long using the raisld efaults.
Keep in mind that all I've done so far is:
- initial rails app setup
- create database & tables
- provide database info in database.yml
- generated "project" model for "projects" database
- generated "project" controller for "projects" database
- added the scaffold to the controller
Any thoughts, ideas, suggestions? Feel free to toss rotten tomatos at me if I'm doing something stupid. Thanks.
(Can you tell I'm not an admin because of my MadRubySkillz?)