Trac is moving

Posted by Stu Sat, 30 Jun 2007 12:52:16 GMT

Trac is now at trac.streamlinedframework.org. Please update your links, I will be turning off the old links on port 8079.

Posted in  | 1 comment | no trackbacks

New in Edge: Render Filters

Posted by Matthew Mon, 25 Jun 2007 13:48:00 GMT

We’re excited to announce a new feature in Edge that will make it much easier to use Streamlined’s default actions while still having control over what gets rendered afterwards. Render filters allow you to tack additional code onto the end of a default action.

Matthew demonstrated these filters in a very early form at the Streamlined tutorial at RailsConf last month. They have since become much more useful and flexible. By using these filters, we’ve been able to stop copying and pasting default actions into our controllers only to make a single small change. Now, we can make the small change declaratively without redefining the action.

For example, what if you prefer that Streamlined redirect back to the list view instead of the show view after updating a record? You would add this render filter to your controller:

render_filter :update, :success => Proc.new {
  redirect_to :action => 'list'
}

What this says is that the Streamlined’s default update action should redirect back to the list action on success. (Render paths can also be defined for failure.)

The contents of the Proc are called in the context of the controller action itself, allowing you to redirect, assign new instance vars, etc. (Pretty much anything you can do inside a controller action.)

More examples and documentation can be found on the wiki.

Posted in  | 2 comments | no trackbacks

New Features in Edge

Posted by jgehtland Fri, 15 Jun 2007 14:55:19 GMT

Here’s some new features we’ve added in Edge, which are all documented over on the Wiki as well:

  • per-relationship options for modifying the display of the select box. If you need to pass options in to modify how the select box is displayed for a to-n relationship, you can do that with the
    :options_for_select
    attribute.
  • per-model-and-CRUD-context options for specifying a custom css class for items from that model. If, in your _ui.rb file, you do something like:
    class PersonUI < Streamlined::UI
       style_classes :list => {:row => 'person_row'}
    end
    
    Each row in the list (in LIST context only) will be wrapped in the CSS style “person_row”.
  • added an :update_only option for columns
  • added support for HTML wrappers around columns

And plenty more. Keep an eye on the Wiki and the Trac Timeline for more.

Posted in  | 2 comments | no trackbacks