Displaying 2 results from an estimated 2 matches for "zeekar".
Did you mean:
meeker
2007 Aug 23
4
Idiomatic way to do a non-database Enumeration?
I have a class which stores as one of its attributes a day of the week
as an integer (0-6, 0=Sunday, standard UNIXy values). I want,
obviously, the views to show the weekday name and the forms to provide
a drop-down with the weekday names. Essentially it''s a vrtual
attribute whose value is the localized weekday name, which maps to the
integer value that''s actually stored.
2007 Oct 22
1
self-referential habtm: why are my keys null?
I''m trying to set up a directional self-referential HABTM to represent
an arbitrary semi-hierarchical structure; it works for any data
prepopulated into the db, but when I try to create a new relationship,
I just get NULLs in both key columns (or 0''s if I turn on the no-null
constraint).
Here are the migrations:
class CreateNodes < ActiveRecord::Migration
def self.up