Topic: Why is my script not writing to the database?
I don't understand this. I've gotten things to work before but this particular thing refuses too. No mistypes as far as I can tell. Please help.
The Model - category.rb
class Category < ActiveRecord::Base
The Controller - category_controller.rb
@category = Category.new
@page_title = "New Category"
<%= error_messages_for 'category' %>
<p><label for="category_name">Category Name</label><br/>
<%= text_field 'category', 'category_name' %></p>
The database is MySQL the table is 'categories' and the only fields are 'id' and 'category_name'
Other parts connect to other table in the database so I can't figure out why this one doesn't.