search for: kind_id

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

2006 Jun 13
0
Best way to format attributes during visualization/editing
...he "kind" method of the "grain" object. Normally it expects an integer while now it returns a string. So, I have modified the snippet above as follows: <p><label for="grain_kind">Select Kind</label><br/> <%= select("grain", "kind_id", Grain::KINDS, { :include_blank => true}) %></p> This has forced me to define other two accessors in the model in order to solve the problem: def kind_id() read_attribute(:kind) end def kind_id=(value) write_attribute(:kind,value) end Now, the question is: Is...
2008 Jul 31
2
selected value for options_from_collection_for_select
Hey, I am trying to get a select list with a selected value in it. Even if I put in an integer, like this, <%= select_tag(fruit.id, "<option>No Contract</option>" + options_from_collection_for_select(@fruit_types, "id", "kind", 3)) %> the list still displays the first option (No Contract) in the list. What am I doing wrong? I''ve looked
2005 Apr 27
5
Eager load mysteriously deletes records
...Todo Load Including Associations (0.000000) [0;37mSELECT todos.position AS t0_r6, todos.due AS t0_r7, whens.todo_id AS t1_r0, whens.id AS t1_r1, todos.repeat_id AS t0_r0, whens.category_id AS t1_r2, todos.hour AS t0_r1, todos.priority AS t0_r2, todos.id AS t0_r3, todos.description AS t0_r4, todos.kind_id AS t0_r5 FROM todos LEFT OUTER JOIN whens ON whens.todo_id = todos.id ORDER BY position ASC [4;33mCategory Load (0.000000) [1;37mSELECT * FROM categories WHERE ckey = ''where'' [4;35mCategory Load (0.000000) [0;37mSELECT * FROM categories WHERE ckey = ''when'...