=== Upgrading to a new version of Hobo === Once you have installed a new version of Hobo, you may wish to run rake hobo:run_standard_generators or rake hobo:run_invite_only_generators This will run all of the standard generators, and pull in any bug fixes or enhancements to generated code. Note that this is quite likely to cause conflicts, so it is highly recommended that you have your code backed up and in a change control system such as git or subversion. === Hobo 1.0.2 === This release is almost identical to 1.0.1 except that it updates the version requirements to exclude Rails3. Hobo does not currently work with Rails3, although we are working on it. This release silences some warnings produced when running with Rails 2.3.10. This release contains preliminary support for Ruby 1.9.2, although you may encounter problems if you use Single Type Inheritance (STI) models. A few very minor bug fixes have also been included. See the [github log](https://github.com/tablatom/hobo/compare/v1.0.1...v1.0.2) for more details. === Hobo 1.0.1 === This version contains two speedups: one fix that reduces the number of database accesses by Matt Jones and one that speeds up compilation of DRYML by Petteri Räty. This version also contains several bug fixes. See the [github log](http://github.com/tablatom/hobo/tree/v1.0.1) for more details. === Hobo 1.0.0 === Drumm-roll! Trumpets! Fanfare! We did it : ) Hobo 1.0.0 is the same as Hobo 0.9.106 except for documentation updates and [this tiny commit](http://github.com/tablatom/hobo/commit/ba9d2cc60fad2e45c7006c31492607882f568763). === Hobo 0.9.106 === Three small bug fixes. See the Git log for more details. http://github.com/tablatom/hobo/commits/v0.9.106 === Hobo 0.9.105 === Iterating quickly now so we can cut this off as soon as possible. [#608](https://hobo.lighthouseapp.com/projects/8324/tickets/608): One of the IE7 fixes was too aggressive, and broke input-many. === Hobo 0.9.104 (AKA 1.0RC3) === [#604](https://hobo.lighthouseapp.com/projects/8324/tickets/604): The new input-many introduced in 0.9.103 had issues with >10 elements, several issues running with IE7 and an issue with its javascript callbacks. [#537](https://hobo.lighthouseapp.com/projects/8324/tickets/537): `x._?.to_s` now returns nil rather than a blank string [#592](https://hobo.lighthouseapp.com/projects/8324/tickets/592): If you previously had a snippet such as this: ...
You now have to use: ...
The same change has been applied to `` [#568](https://hobo.lighthouseapp.com/projects/8324/tickets/568): `hobo_index` now supports the `:scope` option See also the [git log](http://github.com/tablatom/hobo/commits/v0.9.104) === Hobo 0.9.103 (AKA 1.0.RC2) === ### Warning If you are on Rails 2.3.5 and are running Hobo as a plugin, please check out bug [#574](https://hobo.lighthouseapp.com/projects/8324/tickets/574-rails-235-b0rks-our-rake-tasks-running-on-edge-hobo) for a workaround you need to apply to your Rakefile. NOTE: fixed in 0.9.104 ### Bugs This release fixes a couple of serious bugs: [565](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/565) and [567](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/567). ### Input-Many & has-many :through The `` tag in Rapid has been replaced with a version ported from the `` tag in Hobo-JQuery. This brings the following enhancements: - it supports 0 length associations - input-many's may be nested inside of other input-many's - it allows the (+) and (-) buttons to be customized - it provides a default for the `item` parameter - it copies from a template rather than cloning the current item and clearing it - the template may be overridden - id's of textareas and selects and other non-input's are adjusted properly - classdata for inner elements updated The new `` tag differs from `` in that: - it's written in prototype.js rather than in jquery - it doesn't have the delayed initialization feature - the name of the main parameter is `default` rather than `item` - hjq-input-many allows you to provide javascript callbacks. input-many fires rapid:add, rapid:change and rapid:remove events that can be hooked. You will have to ensure that your hobo-rapid.js and clean.css files are updated in your application. === Hobo 0.9.101/0.9.102 (AKA 1.0.BROWN_PAPER_BAG) === Yes, that was embarrassing. How the test suite failed to catch that one is mind blowing. === Hobo 0.9.100 (AKA 1.0.RC1) === Deletions: - Children must now be specified in the viewhints. Hobo no longer uses the presence of :dependent => :destroy to determine the primary child association. - The bundles feature of Hobo which never really worked and was never documented has been removed from this release. - The message "You must activate your account before you can log in. Please check your email." which used to be added to the flash message when a user has signed up has been removed from `hobo_do_signup`. - The fix for [#556](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/556) means that the migration generator now ignores all models that have a `hobo_model` declaration but not a `fields` declaration. If you have any models that do not have a fields declaration (join tables, for example), you may wish to add a blank fields declaration. Major enhancements: - Hobo now supports Ruby 1.9.1. Problems have been encountered with Ruby 1.9.1 and Rails 2.3.4. Rails 2.3.3 and 2.3.5 work fine. - Hobo has been tested against the new Rails 2.3.5. JRuby users may encounter [Rails bug 3497](https://rails.lighthouseapp.com/projects/8994/tickets/3497) - Rails 2.2 is still supported for this release. Support for 2.2 may be dropped post-1.0. - Translations (ie, the ht functions) has now been moved into its own module. To access the translation functions from elsewhere use `Hobo::Translations.ht`. Alternatively, including the Hobo::Translations module into your class will give you `ht` as a local instance method. (This is one of the things the `hobo_controller` declaration does.) - `rake hobo:run_invite_only_generators` was added as an alternative to `rake hobo:run_standard_generators` for those who created their application with the `--invite-only` flag - [#409](https://hobo.lighthouseapp.com/projects/8324/tickets/409) The `` tag has been modified to display the `to_s` representation of the object while in edit mode. The `to_html` representation is still used in view mode. The editor tag for HTML columns has been modified to remove the heavy sanitizing that was previously performed. HtmlString will sanitize before saving to the database. You need to update your hobo-rapid.js for this fix. Run `rake hobo:run_standard_generators` or copy the file directly from [github](http://github.com/tablatom/hobo/blob/master/hobo/rails_generators/hobo_rapid/templates/hobo-rapid.js) - [#296](https://hobo.lighthouseapp.com/projects/8324/tickets/296) The migration generator now fully understands HABTM join tables. Note that the "decorated join table" functionality that was deprecated in Rails 2.3 is NOT supported. - [#475](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/475) User-defined rich types are now loaded from `RAILS_ROOT/app/rich_types`, if it exists. - EnumString's can now be translated. The [manual](http://cookbook.hobocentral.net/manual/hobofields/rich_types) has been updated with the details. - ViewHint's can now be translated. Well, they mostly could in 0.9, but it has been cleaned up and [documented with ViewHints](http://cookbook.hobocentral.net/manual/viewhints). - Lifecycle states can now be translated. The key is `#{table_name}.states.#{state}` Transitions use the key `#{table_name}.actions.#{transition}` Major bug fixes: - [#537](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/537) The `._?.` "smart dot" now returns 'nil' rather than calling its trailing function more often than it used to, more closely matching its documentation. - [#457](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/457) ie7-recalc.js has been updated to improve compatibility with IE6. Please update the copy inside of your application, either by running `rake hobo:run_standard_generators` or by copying the file directly from [github](http://github.com/tablatom/hobo/blob/master/hobo/rails_generators/hobo_rapid/templates/ie7-recalc.js) - [#512](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/512) Hobo now has better compatibility with non-DRYML templates Minor enhancements: - [#554](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/554) The transition-buttons tag no longer displays transitions that are not `:available_to` the user. - [#536](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/536) documentation for field-list more closely matches reality - [#536](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/543) i18n has been silenced. It's messages can be made to reappear on the log via `HOBO_VERBOSE_TRANSLATIONS`. - [#555](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/555) Specifying ignore_index :foo will ignore the index named 'foo' on the model when generating migrations - handy for indexes that can't be generated automatically (with a prefix length on MySQL, for instance) or existing indexes in legacy tables. See also the [git log](http://github.com/tablatom/hobo/commits/v0.9.100) === Hobo 0.9.0 === Major enhancements: - Internationalization! Through the hard work of soey and Spiralis, we now have internationalization support in Hobo. The manual page is on the [cookbook](http://cookbook.hobocentral.net/manual/i18n). Locales are available on [github](http://github.com/Spiralis/hobo-i18n-locales). - Index generation: Matt Jones' automatic index generation code has been merged. The default Rails index names are very long, so this is unlikely to work well on Oracle, which has a 30 character limit. Testing against Postgres, Oracle, SQL Server and JDBC has been extremely limited. To generate indices run script/generate hobo_migration. - New projects now have a summary page on /front/summary that provides application information to the administrator. Current projects may add this action by running the `hobo_front_controller` generator. - STI derived classes can add additional fields to their parent class with the fields block. Note that the "can't generate a migration for STI base and derived classes all at once" issue still applies. In general, STI handling should now work much better. - [Bug 464](https://hobo.lighthouseapp.com/projects/8324/tickets/464-transition-buttons-should-have-a-option-to-link-to-forms-instead-for-transitions-that-take-parameters) The transition-buttons tag now generates buttons that link to the transition page for transitions that require parameters. - [Bug 532](https://hobo.lighthouseapp.com/projects/8324/tickets/532) In previous versions, you had to add the new HTML5 tags to RAILS_ROOT/config/dryml_static_tags.txt. This version whitelists all HTML5 tags except for aside, section, header and footer, which conflict with existing Rapid tags. Major bug fixes: - [Bug 530](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/530) is a critical bug for invite-only projects. To incorporate the fix, you must rerun your generators or follow the instructions in the [commit](http://github.com/tablatom/hobo/commit/17247eac8a78f8b36dcc3b9684a3e4ec8da32a23) - [Bug 480](https://hobo.lighthouseapp.com/projects/8324/tickets/480-find_owner_and_association-method-for-has_many-associations) Owner actions now work with has_many associations - [Bug 516](https://hobo.lighthouseapp.com/projects/8324/tickets/516-association-name-as-parameter-in-lifecycle-step-almost-works) Specifying a belongs_to association as a lifecycle param works; it appears as a select-one on the generated page. - [Bug 515](https://hobo.lighthouseapp.com/projects/8324/tickets/515-virtual-boolean-field-uninitialized-constant-hobobooleancolumn_type) Virtual :boolean fields declared with attr_accessor now work - [Bug 484](https://hobo.lighthouseapp.com/projects/8324/tickets/484-transition-actions-with-key-fail-if-model-isnt-visible-to-guests) Transition actions that require a key no longer check if the model is visible to Guest - [Bug 485](https://hobo.lighthouseapp.com/projects/8324/tickets/485-make-lifecycles-on-sti-subclasses-behave) Lifecycle support on STI models works now. Note that derived classes DO NOT inherit any of the parent lifecycle implementation. - [Bug 387](https://hobo.lighthouseapp.com/projects/8324/tickets/387-inheritance-sti-models-name-not-propagating) STI derived classes now inherit settings like name_attribute correctly. - [Bug 533](https://hobo.lighthouseapp.com/projects/8324/tickets/533-remove-id-from-hidden-field-for-check-box) The hidden field generated with a checkbox input shouldn't have an ID. - [Bug 526](https://hobo.lighthouseapp.com/projects/8324/tickets/526-routing-error-does-not-render-not-found-page) Routing errors now render not-found-page, rather than the default Rails routing error message. Minor Enhancements: - Aside collections now have a new-link at the bottom (inside the preview-with-more) [#421](https://hobo.lighthouseapp.com/projects/8324/tickets/421-auto_actions_for-doesnt-create-add-button-in-sidebar) - the manual now includes a Generators section, and a subsite tutorial has been added. - [Bug 386](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/386) and [Bug 501](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/501) have been fixed, reducing the number of extraneous migrations that the hobo_migration generator creates. These are actually Rails and/or database bugs we're working around. For instance, MySQL does not allow default values for text columns, so Rails silently ignores them. SQLite does not allow scale or precision settings on decimal fields. These types of bugs are good reasons why you should use the same type of database for development, testing and production. - A new view_hint, 'inline_booleans', controls whether boolean attributes are displayed in the header (default behavior of Rapid show pages) or inline with the rest of the field-list. You can either pass a list of field names, or 'true' (without quotes) to make all booleans inline. - hobo_show now accepts a model instance as a first parameter. This restores symmetry with the other hobo_* actions. - on Rails 2.3 and above, routes will be generated with the optional .:format suffix, and the formatted_* routes are skipped. - non-required fields that are marked :unique will now allow nil values. Minor Bug Fixes - [Bug 540](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/540) Hobo::Permissions::Associations::HasManyThroughAssociations#create! did not save as the "!" implied. See the [github log](http://github.com/bryanlarsen/hobo/commits/v0.9.0) === Hobo 0.8.10 === This is a brown paper bag release. The fix for Bug 473 was not properly tested. Thanks Iain Beeston for quickly sending us a patch. === Hobo 0.8.9 === Enhancements: - [precompile_taglibs](http://groups.google.com/group/hobousers/browse_thread/thread/29694e75f60c0870/6b05f75f2f7e91f5) allows you to precompile taglibs during application startup rather than on demand. - `--invite-only` options added ti generator Major bug fixes: - [Bug 461](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/461-hobo-is-not-compatible-with-firefox-35): Firefox 3.5 problems were caused by lowpro. For existing projects, you will have to update your copy of [public/javascripts/lowpro.js](http://github.com/tablatom/hobo/raw/master/hobo/rails_generators/hobo_rapid/templates/lowpro.js) - [Bug 477](http://groups.google.com/group/hobousers/browse_thread/thread/5a15288f9703a8a4/58a8dee62b237d29) caused problems when the user submitted a form from the index page. - "collection" was renamed to "collection-heading" in the Rapid generated show-page. - [Bug 473](https://hobo.lighthouseapp.com/projects/8324/tickets/473-use-timezonenow-instead-of-timenow#ticket-473-5): Hobo now uses any time zone's configured for the application rather than using the server's time zone. Minor bug fixes and enhancements: See the [github log](http://github.com/bryanlarsen/hobo/commits/v0.8.9) === Hobo 0.8.8 === Hobo 0.8.8 comes with some slight changes to the colour scheme for the "clean" theme. To apply these enhancements, you may need to run `rake hobo:run_standard_generators`. Significant bug fixes: - [Bug 422](https://hobo.lighthouseapp.com/projects/8324/tickets/422): Because of it's switch to Rack, Rails 2.3 changed the interaction between checkboxes and their accompanying hidden field. This caused us to always return "false" for a checkbox, even if it was checked. - [Bug 425](https://hobo.lighthouseapp.com/projects/8324/tickets/425): Hobo 0.8.6 removed support for the non-working big_decimal. However, this shared some code with decimal, so we removed a little bit too much code. This restores the missing editor and input for the decimal type. Minor bug fixes: - [Bug 413](https://hobo.lighthouseapp.com/projects/8324/tickets/413): add target attribute to `` links - [Bug 420](https://hobo.lighthouseapp.com/projects/8324/tickets/420): `acts_as_list` controls visible to Guest - [Bug 446](https://hobo.lighthouseapp.com/projects/8324/tickets/446): `` not working - Migration generator fix - would occasionally suggest a default migration name that already exists Minor enhancements: - [Bug 434](https://hobo.lighthouseapp.com/projects/8324/tickets/434): allow String or Hash to be passed in a :redirect optione - `key_timeout` option added to lifecycles - [Bug 437](https://hobo.lighthouseapp.com/projects/8324/tickets/437): 'options' attribute added to `` - [Bug 424](https://hobo.lighthouseapp.com/projects/8324/tickets/424): 'limit' option added to `` - [Bug 440](https://hobo.lighthouseapp.com/projects/8324/tickets/440): support blank Time and DateTime inputs - [Bug 423](https://hobo.lighthouseapp.com/projects/8324/tickets/423): default content for input-many - [Bug 379](https://hobo.lighthouseapp.com/projects/8324/tickets/379): multiple warning messages on email validation - [Bug 404](https://hobo.lighthouseapp.com/projects/8324/tickets/404): Extension to Hobo::Model class to check ViewHints for error validations - [Bug 415](https://hobo.lighthouseapp.com/projects/8324/tickets/415): Visiting sign-up page when logged in gives permission denied - Rapid navigation - added name attribute to `` to make it easier to select the current nav item in some cases (e.g. dynamic nav item text) - Rapid forms -- added url attribute to `` - HoboSupport - `Enumerable.build_hash` can now be used without a block to build a hash directly from a list of pairs === Hobo 0.8.7 === I forgot to refresh the Manifest, so this is a brown paper bag release. === Hobo 0.8.6 === Hobo 0.8.6 includes Rails 2.3 support. Rails 2.2 support has been maintained. Rails 2.1 support was dropped in 0.8.5. Significant effort was put into unit and integration tests in this release. Unit tests may be run via `rake test_all`. Integration tests live in agility: http://github.com/tablatom/agility/tree/master. Some small changes were made to item orders to fix bugs with IE6. This may require updates in custom stylesheets. Previously, the lifecycle transitions had a parameter called :params in the documentation and :update in the code. The code has been updated to match the documentation. Support for `big_integer` in HoboFields has been dropped. It appears that this has never worked correctly. input-many is now a polymorphic tag and the default tag for has_many inputs. The 'content' parameter has been renamed to 'description' for generated cards. input-many and sortable-collection have been improved. Many tags have had parameters and attributes added to improve customization. Many bugs have been fixed. See the [lighthouse]( http://hobo.lighthouseapp.com) or the [git commit history](http://github.com/tablatom/hobo/commits/master/) for more details. 0.8.6 is a release candidate for Hobo 1.0. At this point we do not believe that there are any outstanding bugs on Hobo that do not have workarounds. The [lighthouse](https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/bins/8323) shows the remaining tickets scheduled for 1.0 === Hobo 0.8.5 === New permission system Various fixes Now runs permission checks *before* callbacks, not after In the switch to the new permissions system, we changed to running them after all callbacks. This turned out to be wrong. Permissions should only be about what the user tried to change, not other changes triggered by application logic API change: Web method permissions should now be defined as foo_permitted? instead of foo_call_permitted? Updated hobo command and hobo generator to use the new config.gem style for apps that use the Hobo gem The --add-gem option to script/generate hobo will add "config.gem 'hobo'" to environment.rb. The hobo command does this automatically Lifecycles fix -- state_name would throw a nil error if there was no state (not returns nil) This was causing the :new_key option to fail on a create step Fixes to problems with live-search introduced with the Rails 2.2 upgrade === Hobo 0.8.4 === Rails 2.2 compatible. Rails 2.1 support dropped. Removing the Rails routing patch (from the hobo generator) that is no longer needed. Existing apps can delete this from config/initializers/patch_routing.rb BREAKING: New permission system This is the major feature of this release. The big change is that we now use the dirty tracking features of Active Record for update permission, rather than passing that weird 'new' object. We also use the acting_user method throughout, rather than passing the user as an argument. See the docs online: http://cookbook.hobocentral.net/manual/permissions Removing special Hobo semantics for association.new which was breaking the Rails API, and added #new_candidate association.new_candidate instantiates the record but does not add it to the collection. Fix to linkable? helpers when context responds to origin but is not a collection POSSIBLY BREAKING: Improved multi-model form support has_many and belongs_to now support the :accessible => true option, which allows mass-asssignment of attributes to work with sub-hashes that correspond to associations. Docs to follow! BREAKING: Lifecycle improvements The lifecycle DSL has been tidied up. Various changes to the semantics. Lifecycle validations are now supported (e.g. validates_presence_of :foo, :on => :my_transition) Also small improvements to the controller layer lifecycles support See: http://cookbook.hobocentral.net/manual/lifecycles New ViewHints mechanism Classes in app/viewhints are a place to declare things about your models that are view layer concerns. For example, you can give the presenation name for a field if this should be different from the back-end name. You can give "field help" for each field. You can specify which collections are the "children" of a model from a UI point of view. Rapid -- removed use of as it gets some words wrong (e.g. "an user") Rapid -- moved to rapid_forms.dryml Model controller fix -- owner instance variable should be named after the association, not the class (e.g. @author, not @user) View hints fix -- inconsistent results due to class reloading problem in dev mode (was causing inconsistent Rapid pages to be generated) Hobo Models -- added support for 1-to-1 relationships to Hobo::Model.reverse_reflection This puts us a step closer to better support for 1-to-1 relationships in various places, e.g. for owner actions Improved error message when declaring auto_actions_for on an association that doesn't have the corresponding reverse-reflection Fixed query_params helper -- should URI decode the parameters Rapid -- simplified (no need for a hidden tag) Rapid pages -- added parameter to account page DRYML -- fix to merge-attrs="a, b, c" Rapid -- added support for disable attribute Fix to when forgery protection is disabled User model - validates_presence_of password confirmation, in addition to validates_confirmation_of Fixes #310 - thanks to Jaub Suder BREAKING: Rapid page generators -- Renamed 'primary-content' parameter in to 'description' User controller -- made account action follow the auto_actions declaration Changed hobo->hobofields->hobosupport gem dependency rules to require the exact version User model generator -- Hobo apps now have people log in with their email address by default, and the user has a 'name' field rather than 'username'. Note this will not effect existing apps Clean theme - fix to styling of login page in IE6 Rapid javascripts -- fix to in-place-editor errors not showing up properly (#324). Thanks to Jakub Suder DRYML -- fixed duplicate ID bug with ajax parts (#326) POSSIBLY BREAKING: Models -- removed support for chronic parsing of times / dates. Was wrong to hardwire this support in for every date/time field. Will be added back in as a rich type at some point Scopes - Fixed association.conditions with scopes for has_many :through Rapid -- now honours the 'skip' attribute under all circumstances Rapid -- app-stylesheet param, to make it easier to add in custom stylesheets, but have them *before* application.css Rapid -- call stylesheet_link_tag once only so that asset combining is supported DRYML -- allow as a shorthand for Removed super_user? and adminstrator? from Hobo::Guest, and added administrator? to Guest generator administrator? should not be present at all in core Hobo, it's just a default starting point Rapid -- don't add the hidden field if the checkbox is disabled - thanks to Tola. Rapid -- Fix to 'current' CSS class when a body is not given Rapid pages -- fix to selecting current nav item Added hobo:run_standard_generators task (*NIX only) Guest - changed default #to_s and #login to use lower case Rapid -- allow method name to use dashes, and raise an error if there's no such web method DRYML -- never run DRYML generators in production mode. Instead run rake hobo:generate_taglibs Rapid JavaScripts -- adding custom events to Rapid JavaScript -- added option to specify { message: false } on ajaxRequest to disable the spinner Model Controller -- fix to re_render_form when in a subsite hobo_model_controller generator -- adding support for generating subsite controllers HoboSupport -- adding remove and remove_all (plus mutating versions with a !) to string - better name for sub(x, '') DRYML -- added support for scope.even_odd to the attribute version of repeat (was only on the tag version) DRYML -- improved error message for mixed param / non-param tags Model controller -- fix to index actions on non-paginated formats (was passing will-paginate options to a regular find) Migration generator -- adding option: --force-drop-yes-i-really-mean-it-i-know-what-i-am-doing-dammit Not really, it's actually just --force-drop With this option it won't ask you "drop or rename?" it will just drop HoboFields -- fix to EnumString when values are not valid contant names Rapid -- added support for 'disabled' to Enhanced ajax mechanism so that it can refresh form inputs (was previously not able to figure out the name attributes) Rapid -- adding support for 'disabled' attribute to Rapid -- added a 'no-edit' attribute to and . Gives control over how non-editable fields are handled. - view: render the current value using the `` tag - disable: render the input as normal, but add HTML's `disabled` attribute - skip: render nothing at all - ignore: render the input normally. That is, don't even perform the edit check. Added to the user 'simple pages' (login, signup...) User conrtroller -- redirect to home_page if a logged-in user visits the login page Model controller -- fix to lifecycle form inputs not showing up after a validation error Rapid -- changed rules for chosing whether to be in-place or not BREAKING (minor): removed 'type' attribute from BREAKING (minor): Rapid -- renamed 'separator' attribute of to 'join' Rapid -- moved live-search and filter-menu tags into rapid_plus Rapid -- removed unused . Renamed to , made it polymorphic, and extracted the default definition as Rapid -- tweak to behaviour of . Is now more sensible when called on a non-AR class Re-organisation and documentation for Rapid Document Tags BREAKING: Deleted tag. Models - fix to overriding of not_found and permission_denied in applicatin controller. Also fix to bug in permission denied Models -- fix to preceding dashes in to_param (sometimes showed up in the URL) DRYML -- allow - instead of _ in repeat/if/unless, when not code attribute HoboSupport - re-org of the file layout HoboFields -- new rich type :serialized (HoboFields::SerializedObject) example usage: foo :serialized, :class => Array Also some fixes to wrapping of rich types that were needed HoboFields -- adding 'declared' callback to rich types. Called whenever a field of that type is declared See HoboFields::HtmlString for an example HoboFields -- new types RawHtmlString and RawMarkdownString that are not sanitized. Plus fix to sanitizing DRYML -- new DrymlDoc facility. Starting point for a roll-your-own documentation generator Used to generate the cookbook taglib API reference. hobo_front_controller generator -- use map.root for adding the root route Model controller -- can call #re_render_form without an arg (for when you know params[:page_path] is set) Support for non-numeric model IDs Rails has no problems with these but Hobo was assuming integer IDs in a few places. Fix to default ApplicationController#home_page -- was broken when the app lives in a sub-directory Rapid -- allow '-' instead of '_' in (and therefore, and ) Rapid -- made submit IDs instead of names, so that it also works with models that don't have a unique name Cleanup of dom_id / typed_id. We now use the term "typed id" throughout to refer to a string that includes a model name and an ID. These now use ':' instead of '_' as the model-name/id separator, which has the benefit of allowing non-integer keys HoboSupport -- adding String#safe_constantize. Returns nil (instead of raising a NameError) the constant does not exist and cannot be loaded by ActiveSupport BREAKING. Rapid pages -- separated out application.js from other JS includes and added a parameter Adding extra scripts using this new parameter will ensure application.js comes last and can thus override behaviour of custom scripts. This is a breaking change because apps that have customised the list of JS includes might not now have the set of scripts they expect Rapid - adding polymorphic tag as a place to define the kind of input you want used for collections of a given model Rapid javascripts -- making non-ajax HTML Editor pluggable Plugins assign a function to Hobo.makeHtmlEditor. See hoboyui plugin for an example (github.com/tablatom) Adding XSS protection to HoboFields rich types (Sanitizing) Rapid -- new tag . Add remove items to a has_many :through by checking the ones you want. Obviously this is only suitable when the number of items in the target model is small. (e.g. blog post categories) Page generators -- better titles for collection previews in aside on a user's page Page generators -- improved collection heading on show-page for a user Fixes to "remember me" Card generator -- observe view-hints when putting a count on the card Rapid -- change to css classes on new-object forms (was 'new-post' now 'new post') Rapid -- workaround for the fact that Maruku defines a to_html method on String Page generators -- changed heading used on HoboSupport -- added Object#present? that is on it's way from edge Rails (will remove when Rails provides this) User pages: Added editing of email address to user's account page Got rid of Rapid plus -- added and tags Rapid -- removed unimplemented if-content attribute from base Rapid -- fixed class name dash problem in User model generator -- allow users to change their email address by default Automatic scopes extended with_things and without_things automatic scopes so that they work without arguments. e.g. Question.with_answers and Question.without_answers Automatic scopes -- have 'recent' scope just do a 'limit x' if there is no created_at column (used to blow up) Model Controller, allow :scope => :some_scope_name on index_action Made object_url handle a scoped class (gives the index url, e.g. /posts) Rapid generators -- fixed bug where some cards had title when they should not have Rapid generators -- smarter index-for-owner page when the owner is a user Rapid generators -- fixed wrongly named param in for new-for-ower pages User controller generator -- remove :new action by default DRYML - fixed problem where parameters where conflicting rather than merging Improvements to reset stylesheet - strong, em and code now render as expetced Moved all the tags defined in rapid.dryml into a new included file rapid_core.dryml to make it easier to include only parts of the tag library if required === Hobo 0.8.3 === Hobo models -- improvements to logic for validating passwords. Closes #281 Hobo users -- simpler definition of account_active? This assumes the user has the default lifecycle or similar. If the lifecycle is cusomtised this method can be overridden Lifecycles -- Make current creator/transition available as lifecycle.active_step Lifecycles -- user a safer name for methods to test if the lifecycle is in a given state Now record.lifecycle.is_active? instead of record.lifecycle.active? Lifecycles -- become method should not polute AR namespace (use lifecycle.become) Models -- to_param should always return a string. Closes #280 Rapid -- -- "remember me" is now on by default Fixed typo in . Thanks to Jakub Suder Fixes and Clean theme improvements for site-wide live-search. Closes #290 Removing hobo_spec - test will live in hobo/test, hobofields/test as is normal Adding close button (also, keyboard = ESC) to live-search popup Models -- classes for polymorphic assciations (e.g. Tagging::ble) are now automatically created instead of blowing up when calling reflection.klass. Closes #83 Removed nicedit - we've moved to a plugin based system for rich editors now (see github.com/tablatom/hoboyui) Rapid -- the select menus in now observe conditions applied to the has_many :through Rapid -- fix to double-escaping of names in merge-attrs on Rapid -- added if-present attribute to to supress the nil-view if there is no name Used in to ensure the input box is blank Improved support for validation in multi-model-forms Added support for owner actions where the owner is a has_many :through (was only for :belongs_to owners) Rapid -- improvements to index-for-owner page Rapid -- renamed parameter from 'description' to 'content' Rapid -- adding multipart attribute to
. Usage: Model Controller -- fix to :redirect option for hobo actions DRYML -- fix to dom_id helper when this_parent is a collection Model Controller -- improved remember_page_path to also remember the query string Rapid - fix to -- the confirm attribute was incorrectly changing the button into an ajax button Rapid -- now supports an array of label/value pairs, like the options_for_select helper Model Controller -- Now remembers the previous page path in the session and uses this to fix a problem with (occured after a validation error) New tag for situations where you want input for every item in an existing collection (without the +/- buttons that has) HoboSupport -- enum.rest now returns [] for an empty enumerable (was nil) Rapid + DRYML -- recfactoring the way DRYML keep track of which form field names. It's now possible to track these for a sub-object by setting a new scoped variable form_field_names Rapid -- enhancements to : - sensible defaults for complete-target and completer (you can now use as a drop-in replacement for - The of the referenced object is included in the input box if there is one Rapid -- improved grammar (use of 'a' or 'an') in Model controller autocompleter enhancement -- you can ommit the name of the autocompleter, in which case it defaults to the model's name_attribute Hobo Model -- more robust handling of date hashes Support in Rapid and javascript for It's now very easy to embed form fields for items in a has_many collection. These use javascript + and - buttons, but this does not use ajax. Hobo models -- improved support for mass assignment to has_many associations. Any has_many association can now be assigned a hash. The keys are *only* for ordering purposes. The values are themsleves hashes of attributes. New records are created for any such hash that has no :id key Hobo model -- fix to has_one extension (was discarding the block) DRYML - New behaviour for context_map (repeat): this_field is now the index (0 based) when iterating over a collection. New helpers (HoboHelper) first_item? and last_item? DRYML - fix to loading of nested taglibs Rapid user pages -- don't show forgot-password link if the route is not present should use
instead of

, otherwise block level elements won't be allowed inside and Firefox will sometimes treat them as if they are outside Rapid page generators -- added param to on DRYML - fix to using in a taglib included by a taglib Migration generator -- convert spaces to _ when responding to rename questions Rapid user pages -- made forgot-password link a param hobo_model generator -- formatting improvement Model Controller -- new :redirect option for controller actions Use the rails 'pick_template' mechanism to determine the correct template path when rendering a DRYML view Rapid generators -- adding missing tags to lifecycle forms === Hobo 0.8.2 === Hobo models -- improvement to name-in-URL (#to_param) Added missing input for time fields Rapid forms -- added missing hours/minutes/seconds fields to datetime input Reorg of Hobo Rakefile, in preprartion for move to Shoulda Rapid -- fix to Echoe tasks -- adding workaround for developer-dependencies problem Rapid -- fixes to css class named that had '_' instead of '-' Rapid pages generators -- improvements to form submit button labels ModelController - set the provided key on the record *before* the view permission check during a lifecycle transition Hobo Models -- Model.user_find can now take a block to perform actions on the record prior to the permission check Added Rails dependency to hobofields gem Fix to Rails dependency - any Rails >= 2.1 is ok Reorganised generator tests Hobo users now have an #account_active? method. Used in two places: - This method rather than the return value of the block passed to hobo_login, is now used to figure out if an account is active when logging in. - After signing up, also log the user in iff account_active? is true. This is useful if there is a second step to signing up, such as email activation hobo_front_controller generator -- improved title of home page Rapid generators -- fix to owner link on new-for-owner page Fix to bug where validations were not happening during lifecycle creates/transitions === Hobo 0.8.1 === Fixes to generating and loading subsite controllers Add Rails routing monkey-patch to hobo generator Fixed deprecated use of ActiveSupport Dependencies module Migration generator -- fix to mysql limit problem in Rails 2.1.1 Migration generator -- fixed bug with validation of filename input by user New lifecycle semantics. Lifecycle create and transition actions (blocks) now run *after* the create or transition, and not at all if there are validation errors. To create a key, you can no longer call lifecycle.generate_key in the action, as the key timestamp will not be saved (record has already been saved) Instead pass :new_key => true as an option to the create or transition, and access it in the block using lifecycle.key Fix usage of 'skip' on hidden-fields tag; wasn't comma-splitting input. Correctly skip search field in table-plus search form. Fix to viewable_by? helper Partial fix #251 - add requirement that :id not be empty to resource routes Fix for #256, generating user model not named 'User' Maade request and app_name available by default New user model method account_active? Default implementation is state == 'active' but this method is intended as a hook that can be overridden as required. On signup, the user is only logged in if user has #account_active? Rapid generators -- fixes for form cancel links Rapid generators -- added parameter to show-page Fixes to in-place-editors Allow more advanced default ordering options like 'lower(users.last_name), lower(users.first_name)' Fixed typo in dryml-generator lifecycle pages show-page generator -- fix to test for create permission Rapid generators -- fix for show-page generator, when the 'owner' association that goes with the page's collection cannot be found === Hobo 0.8 === (There's a million changes in this release -- most of the fixes are *not* mentioned) Hobo now works with, and indeed requires, Rails 2.1 Hobo can now be used entirely from the gem, and need not be installed in vendor/plugins. To activate Hobo in this manner in an existing Rails app, just run the hobo generator. This will add the Hobo initializer to config/initializers. hobo command Now shows you what it's doing Renamed --create-dbs to --db-create to match the name of the rake task DRYML DRYML generators Hobo now provides a facility to generate DRYML tags on the fly using normal erb based templates. (the generators run when needed in development mode). The taglibs are written to taglibs/auto. Note that the generated tablibs are *not* intended to be modified, but rather should be imported and overridden in your application. Extending tags: The extend-with attribute is gone, instead we have the tag, e.g. instead of the rather confusing: we now have Also works with polymorphic tags, e.g. Polymorphic tags: new mechanism for defining polymorphic tags. ... "base" definition here ... ... in here you can call and it's not a recursive call but a call to the base definition ... "without" attributes: is a shorthand for . Doesn't sound like much but it's great. You'll like it. now respects the 'if' attribute Using 'with' and 'field' on a parameter works more sensibly now -- DRYML will never merge with attributes and field attributes New semantics for scoped variables. Scoped variables must be declared at the start of the scope. Assignments and reads always go back to the scope where that variable was declared. Fix to (i.e. one or more whitespace chars) being ignored Removed feature from add_classes helper that was converting all _ to -. Closes #11 param='x' now adds class='x' to the output. Closes #22. Doesn't add a css class if the param name is the same as the tag name, or is 'default' Fixes to errors when reporting syntax error : ) Now raises an error rather than outputting nonsensical name attributes on form inputs Removed incorrect leading '/' on template paths (e.g. in logs, stack traces) Fix -- was accepting close tags that are a prefix of the start tags, e.g. ... Rapid tag Library Rapid generators utilising the new DRYML generators feature. Pages, cards, forms, and the main navigation tag, are all generated now. New layout mechanism, and simplified tag. Together with the Clean theme, it is not very easy to create column based layouts. As a result, the "layout" attribute (to ) is gone, as are tags like . The standard tag now has just a parameter. Specific pages might add or themselves. As a result of the switch to generators and the simplified page-layout stuff, there's quite a lot of change in Rapid.

will include the flash messages at the top of the section *unless* they are rendered by a sub-section or have been rendered already Update forms with not render if the user doesn't have permission Removed
-- the "Edit" link now goes to action="edit" (was linking to the show page) is now better at guessing the label to use, also now supports to downcase the label. is gone - hooray for overflow: hidden Added do to as in: New tag creates a form with a , non-editable fields are skipped (used keep them in but to drop back to views). displays nothing if the object is not viewable. Default card has various improvements. New attribute Fix: merge-attrs was missing on the belongs_to view now supports a custom ajax message and configures the ajax spinner to appear near the checkbox. Fix: incorrect use of
is now
and only has the special behaviour if you give a 'fields' attribute or '' parameter. Otherwise it's just like a static tag. for dates and times no longer break when the context is nil. - unless-none attribute is gone. user if-any now takes a 'name' attribute takes a 'subsite' attribute Rake tasks New task hobo:fixdryml (see DRYML section above) dump_fixtures is now hobo:fixtures:dump Hobo models Automatically declares the field 'position :integer' if the model acts_as_list. never_show declarations are now inherited Fix: def_scope was broken when the scope name ended '?' Fix: Hobo broke the 'guard_protected_attributes' optional parameter to attributes=. (this was breaking attachment_fu) Fix: assigning Date and Time objects in mass-assignment was broken. User model Newly generated user models (hobo_user_model generator) now give create permission to all by default (to enable signup). logins_count renamed to login_count (Hobo manages this field for you if it exists). Core extensions Module#alias_tag_chain, which never should have been there is gone. (It's not needed now that camel-case tags have gone). === Release 0.6.4 === Fix: In-place-editors were not working with the new version of Scriptaculous The default fade effect on in-place-editors is now disabled now has a title === Release 0.6.3 === New feature: subsites, i.e. namespaced routes, plus support in the controller and view layers. Subsites are created automatically for any directories found in app/controllers. Links default to the current subsite unless you give a subite="..." attribute. The taglib app/views//.dryml is automatically included in every page in the subsite. The out-of-box app is not in great shape in this release, mostly due to problems with the theme. We haven't fixed it because the theme system going to change radically in Hobo 0.7 New version of lowpro, compatible with Prototype 1.6 (rev 267) Change to hobo command: hobo [...options...] app-name instead of hobo app-name [...options...] Migration generator Automatically ignores non-Hobo models (and associated tables) Hobo::Migrations.ignore_models is now deprecated. Use Hobo::Migrations.ignore to list models that should be ignored. The associated tables are ignored too (rarely needed, as these are probably not Hobo models anyway) Hobo::Migrations.ignore_tables is still supported Fix: problems with going back to a nil default from a non-nil default. Hobo model generator In line with Rails 2.0, the timestamps declaration is now included by default (it's generally something every model should have). hobo_base.css Removed over-zealous styling of too many elements. hobo_rapid.css Change of class names for validation errors. hobo_rapid.js Now silently ignores update to non-existent part. This is convenient when parts are being added dynamically, but may prove to be a mistake :-) Global variable controllerNames is gone. Now use calls to Hobo.pluralise. (Gee I guess we should really standardise on American spellings) The 'fade' parameter to removeButton is now an option. Confirmation is now optional too. Hobo.partFor returns the part containing a given element. Used in the new update="self" feature. LowPro behaviour HasManyThroughInput. This is badly named and will change. Core extensions alias_tag_chain is like alias_method_chain but for DRYML tags SafeNil Now more efficient (thanks to "steve d" -- http://coderrr.wordpress.com) Fix when used with DelegateClass New method #implies on booleans. Borrowed from Eiffel. Useful in permission methods. true.implies false #=> false true.implies true #=> true false.implies x #=> true Hash#map_hash. The block is passed only the value if the arity is 1. DRYML The ability to define tags in Ruby is now removed Tag extension: This encapsulates the alias_method_chain pattern. The tag can make a call to to get the old behaviour. alias_current_as is gone -- replaced by extend_with Fix: some DRYML attributes were leaking through to the output HTML part_locals can now be passed instance variable names, e.g. part_locals="@user". Note that inside the part this creates a local variable "user". Don't user @user inside the part. It's just a convenience to avoid the need to do Fix: failure to accumulate CSS class names when merging attributes. DRYML now gives the type returned by #field_type (when available) over this.class Fix: when overriding a parameter, the of the new parameter would incorrectly provide the old tagbody which should have been overridden. hoboParts variable is now set by rather than being hard wired in the output from the DRYML compiler. Fix: caching problems with tags imported by the include_tablib directive. AJAX Parts Calls to parts, along with the part-state variables are now logged. Can now say part="self" when a tag wants to update the part it is contained in (useful for re-usable tags). Rich data types All rich data types now register themselves with Hobo, e.g. class Hobo::EmailAddress < String COLUMN_TYPE = :string ... end Hobo.field_types[:email_address] = Hobo::EmailAddress New type builder - enum_string. e.g. fields do gender enum_string(:male, :female) end You can then do, e.g. if current_user.gender.male? (You also automatically get select menu's in your views) Hobo models In fields declaration: Got rid of weird thing where providing :length meant the type defaulted to :string Can now give classes as well as symbolic names for column types. Mass attribute assignment extended to support some features that were in the model controller. e.g. Dates can be represented as Hashes of month, day etc. Chronic will be used to parse dates if available. Object references (e.g. belongs_to relationships) can be set with "@" as before. "fields do" can optionally be used with a parameter if you don't like the instance_eval hackery: fields do |f| f.name :string end belongs_to can be given :null => false, which is passed through to the migration generator. New method #column returns the meta-data for the named column. #find now returns arrays with a #member_class method def_scope Chained scopes on a class didn't work at all -- now fixed, e.g. Posts.recent.by_author.find(:all) Fix: def_scope with sql parameter interpolation was broken. #changed_fields, which was next to useless, replaced with #only_changed_fields, which is used to assert that only the given fields have changed. Hobo user model The module is renamed from Hobo::AuthenticatedUser to just Hobo::User It is no longer possible to set the login attribute by passing a symbol to hobo_user_model. Go back to using set_login_attr. Didn't work out. It happens sometimes. Helpers #subsite returns the name of the current subsite. #object_url can now be passed the siubsite, e.g. :subsite => "admin" #object_url can only be passed a single hash of options now (could be passed any ammount before) #dom_id now returns "" when a dom_id cannot be generated (used to raise an error) #map_this now works with ranges (used by DRYML's repeat) #current_page_url returns request.request_uri without the query string #query_params now returns a HashWithIndifferentAccess Hobo.dom_id now works better with non-hobo models Permission System Fix: view permission was causing errors with non-hobo models. Now defaults to viewable. Hobo Controller include_tablib accepts symbols as well as strings #redirect_to now forwards all params to object_url when not given a String, Symbol or Hash #hobo_ajax_response no longer need be passed a dryml this Model controller Multiple model creates / updates are gone from the controller layer. Hobo now uses good ol' Rails mass attribute assignment. Coping with multiple object updates should be handled in the model layer. Some features from the model controller have been moved to the model layer, and more will be added in the future. Attempts to automatically re-render the correct page after a validation error on create / update using a form parameter "page_path", which the tag provides in a hidden field. Previously assumed the form came from the new / edit action. Automatic pagination is now only applied to appropriate mime-types. Add mime-types to Hobo::ModelController.PAGINATE_FORMATS to have them paginated. New declaration 'auto_actions' allows you to select which actions Hobo provides for you automatically. # White list auto_actions :show, :index or # Black list auto_action :all, :except => [ :new_comment ] You can use :collections to add/remove all collection actions in either the black or white list. New declaration 'index_action' declares a new index-like action (similar to show_action) index_action, show_action and web_method can now all be given blocks, rather than defining a method of the same name: show_action :summary do hobo_show Post.find(params[:id], :include => :comments) end Web methods now automatically respond with hobo_ajax_response if the method does not respond. #search Now less magic (i.e. doesn't operate by side-effecting). It now returns a condition string suitable to be passed to :conditions. Can be given a model as the first argument to search on a different model (e.g. for show-collection actions). Fix: :paginate => false was broken #create, #update and #destroy now set flash messages by default (only on "wants.html" requests) used as the default permission denied response. used as the default 404 response. User controller Added various customisation options to login and signup On login, redirect to #home_page -- you can override this on your controllers. The actual name of the login attribute (e.g. "email", "username") is now used in flash messages. hobo_logout can now be given a block to customise the response. Fixes for validation errors on signup. Routing Routes for non-existent actions are not generated. Tag library: Core tags will wrap its content in ther tag specified by tag="..." if when="..." is true. Fix: -- was behaving like Tag library: Rapid now has params
new attribute 'empty' -- when given the table is rendered even when there are items in the collection. now respects view permission properly now does a #strip to the output -- new attribute if_any - set to true to output nothing if the count is zero. Tag library: Rapid documents The 'document' tags like
,
now supports tempalte parameters for each cell when given a 'fields' attribute, e.g. ( might seem like a better name, but we wanted to be compatible with so it's easy to flip back and forth). tag now respects view permission. now only renders the link if the current user has the required create permission. now supports attribute 'truncate' now supports a 'format' attribute - a strftime style format string. New tag . Sometimes permissions are a view layer concern - you actually want to say "these colors, this logo, etc. are only to be seen by the administrator". New tag . An easy way to say either "You have 3 posts in this thread" or "Fred Blogs has 3 posts in this thread", depending on whether Fred Blogs is the current user. Fixes to the tags in rapid_documents to avoid evaling tagbody twice. fixed (was outputing hidden fields even when the field existed in the form). Also now support "for_query_string" attribute, to output hidden fields for the name/value pairs in the current query string. now sets a scoped variable "in_form" so tags can behave differently when they are inside a form (FieldList does this). for datetime and date now supports the same attributes as the equivalent rails helpers. e.g. you can change the order of the fields. can now be passed an array of records in the "options" attribute (instead of retrieving the entire target table from the DB). Fixes to page navigation upgraded to cope with multiple user models. Rapid pages: Various new template params made available, including many on login and signup pages. updated for multiple user models fix to ajax updating of record count New css classes added to and added to Fix to new link in tag removed from default ajax progress. Dryml Important change ommitted from 0.6 changelog - attributes passed to the tag that are not in the tags declared attributes are available in a local variable "attributes" (used to be called "options"). can now assign to dotted named (object attributes) as well as locals, and can have controll attributes on it (e.g. if) Fix to replacing template parameters that are themselves templates. When a boolean is in context, this_type is now always TrueClass (never FalseClass even if the value is false). TrueClass is the Hobo boolean type. #render_tag on a page renderer object (Dryml internals) now returns false. This alows Hobo's controller to say "call this tag if it exists, otherwise..." Rich types Registered rich types can now provide there own validations that get added to the model automatically. E.g. Hobo::EmailAddress automatically validates the content as a valid email address. Hobo helpers New helper query_params returns a hash of parameters extracted from the query string only (#params returns route-based parameters too). Only works with simple name=value parameters. === Release 0.6.1 === Multiple user models Hobo now supports multiple user models, with independent sign-up / log-in/out for each. The controller needs to declare hobo_user_controller instead of hobo_model_controller (it still has all the hobo_model_controller features). e.g. class AdminsController; hobo_user_controller; end Hobo routing will automatically give you /admin_login /admin_logout /admin_signup Note this controller will now filter logging of passwords. The model needs to include Hobo::AuthenticatedUser and declare a login attribute with, e.g. set_login_attr :email The hobo_front_controller generator no longer generates anything related to users - it's now just the fron page and search page. There is a new hobo_user_model generator to create these controllers. The global value Hobo.user_model is gone Rapid now has and templates. They're not so customisable just now but you can of course replace them completely with your own views. Misc fixes Search was broken The 'hobo' command tried to connect to the DB, which was a problem as you'd had no chance to configure database.yml Rapid Fix: reset_form and refocus form options
now supports @fields, allowing you to give a bunch of field names and automatically have a table with a column for each of those fields. There's also a param that can be used to have a delete button and edit link on each row. As usual there's a ton of customisation options - see the source. is now and takes flags @plural and @lowercase and have better automatic css classes Restored old behaviour where would display nothing when there's only one page. Finally created Small cleanups in the rapid pages New tag used in
to iterate over the column headings. for Time objects now supports @format - a strftime style format string. Migration generator Fix: Edge Rails now dumps out in sexy format, which was freaking the migration generator. You can now configure the generator to completely ignore specified tables and models. In environment.rb do Hobo::Migrations.ignore = %w(red_fish blue_fish) That will ignore the models RedFish and BlueFish, and the tables red_fishes and blue_fishes To ignore just tables, assign an array of their names to Hobo::Migrations.ignore_tables To ignore just models, assign an array of the class names to Hobo::Migrations.ignore_models New secure ajax parts mechanism The new mechanism stores the part state in a base 64 encoded string, complete with an SHA1 (by default) digest, so malicious tampering with the part state is prevented. Parts can now capture the state of local variables along with the DRYML context. Give a list of locals you wish to capture in the 'part_locals' attribute. e.g.
...
(the inability to do this was a serious limitation of the previous mechanism) Core extensions Added Methodphitamine and removed omap, oselect, ofind, oany oall. See http://jicksta.com/articles/2007/08/04/the-methodphitamine DRYML merge_attrs fixed to not complain about nils Fix: css classes were not accumulated in some template parameter situations Hobo module #type_name renamed to #type_id #object_from_dom_id will now return classes when the id has no, er, id. As in Hobo.object_from_dom_id("blog_post") #=> BlogPost Similarly, #dom_id generates those kind of ID for classes === Release 0.6 === DRYML Local tags are gone. We finally gave up on this feature as too complex. New feature - allows a variable assignment that exists only for the lifetime of the tag-body of . At the end of the block, the previous value of the variable, if there will be restored. This feature gives a lot of the power of local tags in a less pure but far simpler mechanism. New feature - polymorphic tags. A tag can have many definitions for different types of object. Define with e.g. ... ... call with The actual tag called will be selected according to the type of the current context. Core tags moved from lib/hobo/core.rb to tags/core.dryml. This follows on from the deprecating of def_tag Fix: attrs_for now works with tags imported from a taglib Gone: template parameter modifiers (e.g. ). The only one left is 'replace' which is now written as '' and 'replace' is now a reserved attribute name. Two new features - default tagbodies and restoring parameters - give the same functionality but are more powerful because you can now _wrap_ a parameter in your own tag. New feature - default tagbodies. Tags can provide a default tagbody like this: ...this is the default... Callers can keep the default: replace it my tagbody or wrap it in new content: You can give restore the default tagbody of an element further up the hierarchy using the 'for' attribute. e.g: New feature: restoring replaced template parameters. For example - wrapping a template param in an extra div:
def@alias_current renamed to 'alias_current_as' @if and @unless controll attributes always test for non-blank rather than true. This is more convenient in DRYML where we generally want to skip stuff if a collection is empty (empty enumerables are blank, but not false) An attribute that starts with an XML entity reference is *not* considered a code attribute, even though it does start '&' e.g. label="» Next" #merge_attrs now always accumultates rather than replaces css classes. form, input and a have been removed from static_tags - these are now defined tags. Many core tags moved to Rapid. There are very ferw core tags now - just the basic control tags (if, unless etc.) Hobo Models The display_name method is not used anymore. Instead use the new polymorphic tags. ... The tag eventually falls back on to_s, so as an alternative you can rename your display_name methods to to_s. New semantics for #new and #build. #new now does what new_without_appending used to do. That is, it instantiates a new object exactly as if it was in the collection, but it does not modify the collection itself. #build is extended so that it sets the belongs_to association that is the counterpart to the has_many. For existing apps, just change any calls to #new_without_appending to #new Refactored the rich type mechanism to make it easier to add new types. To add a new type, e.g.: class Isbn < String; COLUMN_TYPE = :string; end Hobo.field_types[:isbn] = Isbn You can then use :isbn as a field type in 'fields do', and register a view with New rich type Hobo::EmailAddress < String Doesn't have any special behaviour as yet, but we could do nifty things with it in the future like auto anti-spam cloaking, validations... New method #nillable_field? tests if the underlying collumn can be null. New methods #created_date and #modified_date return [created|modified]_at.to_date Default to_s for all hobo_models Model controller Boolean fields now get a false value when the param is either '0' or 'false'. Front controller All the templates are updated to use the new DRYML Migration generator Now gives an option to generate and run the migration immediately Will create the "foo_type" column for belongs_to associations marked as polymorphic. Hobo Rapid lib/hobo/rapid.rb is gone. The tags are now in tags/rapid.dryml and the helpers are in lib/hobo/rapid_helper.rb Now includes two CSS stylesheets. hobo_base.css provides some handy reset rules to reduce cross-browser headaches, and hobo_rapid.css provides default styling for some of the Rapid components. Rapid split up into more separate dryml files: rapid, rapid_document_tags, rapid_forms, rapid_pages, rapid_editing, rapid_navigation, rapid_support There are a great many changes to the Rapid tags, too much to describe individually here. The most important changes are: becomes . is a polymorphic tag, so you can is gone. Use if you want a tag that gives an in-place (ajax) editor, and degrades to if the user does not have edit permission. is a polymorphic tag, so you can is now . If you give a type attribute, you get a regular html input tag, if you don't you get a smart Hobo form field appropriate for the type of the context. is a polymorphic tag, so you can All the special form-field tags tags that ended _field now end _input becomes
becomes