search for: comment_control

Displaying 3 results from an estimated 3 matches for "comment_control".

2006 Jan 19
4
Relationships... not the personal kind!
...as well. (this part makes perfect sense): class Comment < ActiveRecord::Base belongs_to :posting belongs_to :user end class Posting < ActiveRecord::Base has_many :comments belongs_to :user end class User < ActiveRecord::Base has_many :comments has_many :postings end In the comment_controller, how would I actually go about saving the comment with the appropriate foreign keys of the posting and user. In the comments table I have the appropriate columns (posting_id, user_id). Here''s what I have in the comment_controller for creating a new comment: def new @comment = Com...
2006 May 15
33
acts_as_commentable release
I now have the acts_as_commentable plugin up on RubyForge. This plugin will allow you to add comments to any active_record object in your Rails application. So far the directions are simple, and there are only a few features: To install: ruby script/plugin install svn://rubyforge.org//var/svn/commentable/acts_as_commentable In the readme there is a sample migration you will need to use, with
2006 Aug 13
5
Newbie question: scaffold not working
I went through a tutorial at http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1 to get started with RoR. I really like the idea of the scaffold construct, but I can''t seem to get it to work the way it was described in the tutorial. I''ve got a mysql database that is properly configured, and a table called ''quotes'' with a column called