search for: mat1975

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

Did you mean: daf1975
2006 Mar 04
2
convert string to AR class
Hi everyone, I''m trying to convert a string passed on the command-line into an ActiveRecord class, so I can do something like this. a="SomeClass" a.find(:all) where class SomeClass < ActiveRecord::Base end This appears to work (better ways would be appreciated): a="SomeClass" b=eval a b.find(:all) However I would like to make sure
2006 Feb 22
3
Listing/Relationship Question
Hello, I know this is probably super simple, but for some reason I just can''t get it! What I want to do is click on a post and display all the categories that the post is in. class Post < ActiveRecord::Base has_many :categories end class Category < ActiveRecord::Base belongs_to :post end ...simple enough. In the categories_controller I have this: def list_all_categories
2006 Feb 24
1
(mostly) self documenting schema
I have to write/maintain a document describing schema being used in my Rails application. I have about 7+ tables. I would like to use ActiveRecord (or something similar) to dynamically generate the parts of the document with column names, types, attributes, etc. Is there code out there for this? If not do you think AR would support this? Thanks, -mat -- Posted via