New Features in Edge Streamlined
Posted by jgehtland Mon, 07 May 2007 03:34:26 GMT
We’ve had a busy few weeks, so here’s an update on some of the new features we’ve added in Edge recently:
Enumerations
We’ve added the ability to denote a column as an enumeration. For example, in the sample project, an instance of Team has a column called :sport. It contains a string, but instead of being a free input, by making it an enumeration, the user is given a drop-down which provides them their options. The syntax looks like this:
user_columns :sport, {:enumeration => Sport.SPORTS}
The value passed to :enumeration can be any array.
Associations editable everywhere
In the original version of Streamlined, associations were only editable through Ajax from the list view. During create and edit, the associations were hidden. Now, associations can be edited from list, edit or create views, and by default, all three. To change that behavior, you can use any of the following options:
- :read_only. The association only displays, cannot be edited in any view.
- :create_only. The association can only be edited during creation of the record.
- :edit_in_list => false. Turns off editing of the association in the list view.
Usage:
user_columns :players, {:edit_in_list => false},
:coach, {:create_only => true},
:mascot, {:read_only}
Unassigned in drop-down
Streamlined has long had a feature that attempts to detect if you have validations on an association that require it to be filled in. If so, Streamlined removes the “Unassigned” option from the drop-down, preventing the user being presented with an invalid choice. In Edge, we’ve expanded that behavior, and now you can provide a global or per-model override to the text “Unassigned”.
Usage:
user_columns :coach, {:unsassigned_value => 'None'}
Ability to suppress quick delete button from list view
You can now turn off per-row delete buttons in the list view by marking quick_delete_button as false.
Usage:
class TeamUI < Streamlined::UI quick_delete_button false end
Disabling live filtering
You can also disable the display of the filter box on any list view by marking table_filter as false.
Usage:
class TeamUI < Streamlined::UI table_filter false end
That’s a pretty good list for now. We’ll be talking about more changes in upcoming posts. Don’t forget to check out the sample project for real examples of the plugin in action.



