0.9 Release Notes
The Streamlined team is pleased to announce the release of Streamlined version 0.9 final.
Streamlined is a plugin for Ruby on Rails that provides an instant, production-ready UI for your ActiveRecord models. It started as a way to generate Administrative back-ends, but has become more general purpose and flexible over time. Streamlined aims to bring the declarative goodness of ActiveRecord to the view tier. It manages the presentation, creation, and editing of model instances, providing full-featured scaffolds equipped with everything you need to quickly and easily develop a rich user interface for interacting with your data.
The Streamlined team kindly thanks the users and patch contributors that have helped us reach this important milestone. Streamlined continues to ease our Rails development efforts day in and day out, and we hope you find it equally as useful and enjoyable.
What’s New in 0.9?
Streamlined#ui_for Replaces UI Classes
In prior releases, you would define a UI class for each Streamlined model you wished to customize:
class TeamUI < Streamlined::UI
user_columns :name, :city
end
As of 0.9, you can simply invoke Streamlined#ui_for anywhere in your application in order to set-up the desired Streamlined UI configuration for your app.
Streamlined.ui_for(Team) do
user_columns :name, :city
end
You no longer have to be within the UI class in order to make these customizations. Not only does this enhancement greatly increase the ease of testing in Streamlined, it also frees you to tweak your UI setup from anywhere you like, anytime you like.
The use of Streamlined::UI classes (demonstrated by TeamUI in the old syntax above) has been deprecated and will be removed in a future release.
Quick Add
In the middle of creating or editing a record and you need to create a new record for an association column? Say you’re selecting a user from a drop-down list and the user you’re looking for doesn’t exist yet. Just click on the Quick Add icon next to the drop-down and up pops a new window ready to capture the data for the that new user. You simply fill in the fields for the new user, click Save, and the new user shows up immediately in the original drop down list.

And one click of the button yields the handy Quick Add interface.

Auto-labeling Now Provided for Required Fields
Rails is all about being DRY, and developing with Streamlined is no exception to that rule. If the validation_reflection plugin is installed in your application, Streamlined will automatically denote the required fields will an red asterisk.

Red asterisks aren’t quite your style? No worries. You can configure your own style for marking required fields with minimal effort.
Breadcrumbs Support Now Available
Now that you’ve got Streamlined and you can crank out applications at the speed of light, there’s nothing stopping you from building interfaces for managing any and all of the data that crosses your path. But whoa! That’s a lot of data. You wouldn’t want your users getting lost along the way, would you? Enter breadcrumbs.

To enable breadcrumbs, simply add the following logic to ApplicationHelper, and Streamlined will take care of the rest.
def breadcrumb
true
end
Export to JSON
In addition to the ability to export your data as XML or CSV, Streamlined now provides one-click export to JSON, and it’s right at your fingertips in the list view.

Advanced Filtering
If your application needs something beyond the standard Streamlined filtering, you can infuse your app with a hearty dose of electrolytes and enable the shiny new advanced filtering. Simply add the following code toapp/helpers/application_helper.rb, and voilĂ .
def advanced_filtering
true
end

application_helper.rb, you can
- Filter on any database field appearing in the list, as well as filtering on association fields.
- Add multiple filters, and Streamlined will AND them together.
- Use the comparison operators right in the UI: <=, >=, <, >, =, is (“is null”, “is blank”, “is empty”, “is nil”), after, or before. (If no operand is specified the default query is a “LIKE”, just as in the standard Streamlined filters.)
Advanced Filtering Examples
- Select “name” (or some other text field) and enter “john” to return all the names containing “john”
- Select “name” and enter ”=john” (or “is john”) to return all the names exactly matching “john”
- Select a numeric field and enter “100” to return all the numbers containing “100” (100, 1000, 5100, etc.)
- Select a numeric field and enter ”=100” (or “is 100”) to return all the number equal to 100. (And of course you can use <, >, etc.)
- Select a date field, and…
- Enter ”> 2007-05-20” (or “after 2007-05-20”) to return all items after May 20th
- Select that date field again and add another filter to get a range of dates
- Enter ”< 2007-06-20” (or “before 2007-06-20”) for dates before June 20th, 2007
- Enter “2007” for all items in 2007
- Enter “2007-05” for all items in May, 2007
Upgrade Notes
If you have streamlined linked as an external, and you didn’t reinstall the plugin, you won’t get the new layout file and won’t
see the filtering. Either run the rake task (rake streamlined:install_files) or copy over the streamlined layout file from plugins/streamlined/files/streamlined.rhtml to app/views/layouts.
Introducing render_wrapper
When you find yourself needing to wrap an auto-rendered column from Streamlined with some custom arbitrary HTML, render_wrapper is just the tool for the job.
Streamlined.ui_for(Team) do
user_columns :personnel, {:render_wrapper => :red_content}
end
module TeamsHelper
# Called by render_wrapper.
# Column#render_wrapper is very fragile, and is intended as an alternative to something even worse:
# custom rendering an entire partial to make some tiny tweak. Use with care.
def red_content(meth,view,*args)
if meth.name == "render_content"
"<span style='color:red;'>#{meth.call(view,*args)}</span>"
else
meth.call(view,*args)
end
end
end
More Examples in the Sample App
You’ll find examples of most of these (and other) features in the Streamlined sample application. You can simply run the app to see many of the features in action, but we encourage you to also take a moment to look at the code. In many places, you’ll see various declarations that you can uncomment in order to try out a given feature. For example, consider the exporters declaration below from player_ui.rb.
class PlayerUI < Streamlined::UI
# This turns off the quick delete button in the list view.
quick_delete_button false
# Only show the CSV and XML export links
# exporters :csv, :xml
end
Documentation Updates, Bug Fixes, etc.
We’re continuing the ongoing effort of fleshing out the documentation, and you can see the fruits of that labor on the wiki. In addition to beefing up the docs and implementing the enhancements discussed above, the Streamlined team has knocked out numerous bugs and upped overall the quality of the framework as a whole.
From small usability items (like rendering empty lists in a more aesthetically pleasing fashion) to more rigorous tasks (such as increasing test coverage), this release marks an important milestone on the road to Streamlined 1.0. We hope you enjoy it!
Installation Instructions
Ready to take it for a spin? Head on over to the download page for information on adding Streamlined to your app.



