search for: field_c

Displaying 2 results from an estimated 2 matches for "field_c".

Did you mean: field_r
2006 Jul 17
3
Best practices - field initialization based on display rules
...equal to the value of text field B and disable field C. If checkbox A is unchecked then enable field C. In order to display a form where I''m manipulating an already existing object, I have something like this in my RHTML template to display text field C: <%= (@obj.field_B == @obj.field_C) ? text_field(:obj, ''field_C'', :disabled => ''true'') : text_field(:obj, ''field_C'', :disabled => ''false'') %> Should I put this logic in a helper so as to simplify my template and keep this small bit of busin...
2006 Apr 10
1
Add Column After Column in Migrations
Adding a column to a table just places the column at the end, but I like to keep related columns together. Is there a way to specify where the column is added in a table with migrations? For example, in MySQL you can do: ALTER TABLE my_table ADD COLUMN new_column INT AFTER other_column I was hoping migrations would support something like this: add_column :my_table, :new_column, :integer,