search for: kistner

Displaying 4 results from an estimated 4 matches for "kistner".

Did you mean: kister
2005 Apr 20
2
Has And Belongs To Many Validations
Here is the schema that I am working with: courses -> courses_teachers <- teachers I want to ensure that a teacher is not assigned the same course more than once. In other words, if I''m in the courses_teachers table as teaching Spanish 101, if someone tries to add that same teacher/course combination to the table again, it will not be allowed. I thought I could use something
2005 Apr 23
2
[Tip] Introspection to determine if a column may be null
I still want to get this into Rails for all connection adaptors, but for now I''ve hacked my own addition on for just PostgreSQL. The following code extends every Column object returned by MyModel.columns to support a new #required? method, which indicates if the column may or may not be null. The following is a huge hack - suggestions on a cleaner way to add this functionality
2005 May 17
8
acts_as_tree elegant tree printing
Hi, I''m working with acts_as_tree to print an unordered list of items: Root -- Child ---- Child I''ve got this working, however I''d like to know if there is a more elegant fashion that I''m unaware of: #Takes a parent category and recursivley returns all children def find_all_subcategories(category) if category.children.size > 0
2005 Apr 18
11
Create a pseudo-model from SQL query?
I''m having a hard time figuring out how to build my application using Rails. As i go along, simple questions occur to me like: are you supposed to have a separate model class (each in its own file, in the app/models directory) for each table in your database? You''d think that something as basic as this would be laid out in the introductory documentation but, alas, the