All Versions
Latest Version
Avg Release Cycle
65 days
Latest Release

Changelog History
Page 4

  • v1.0.3 Changes

    • โœ‚ Remove unprofessional puts, @smathy.
  • v1.0.2 Changes

    • Treat all requests as params requests unless the operation has a representer mixed in. If you don't want that, you can override using is_document: false. This appears to be the smoothest solution for all.
    • In Controller#form, the options argument is now passed into form.prepopulate!(options). This allows to use arbitrary options and the options[:params] for prepopulation.
  • v1.0.1 Changes

    • Treat :js requests as non-document, too.
    • Controller#form now returns the form object and not the operation.
    • In Controller, #form, #present, #run and #respond now all have the same API: run(constant, options). If you want to pass a custom params hash, use run Comment::Create, params: {..}.
  • v1.0.0 Changes

    • ๐Ÿš… All Rails-relevant files are now in the trailblazer-rails gem. You have to include it should you be in a Rails environment.
    • ๐Ÿ—„ Operation[{..}] is deprecated in favor of Operation.({..}).
    • Operation::CRUD is now Operation::Model.
    • Controller#form now invokes #prepopulate! before rendering the view.
    • Controller#present does not instantiate and assign @form anymore.
    • The internal Operation API has changed from #initialize() and #run(params) to #initialize(params) and #run.
  • v0.3.4 Changes

    • โž• Added Operation::Policy.
    • โž• Added Operation::Resolver.
  • v0.3.3 Changes

    • Add Operation::reject which will run the block when invalid.
    • ๐Ÿš… In the railtie, require trailblazer/autoloading as I am assuming Rails users want maximum comfort.
  • v0.3.2 Changes

    • Allow to use #contract before #validate. The contract will be instantiated once per #run using #contract and then memoized. This allows to add/modify the contract before you validate it using #validate.
    • New signature for Operation#contract_for(model, contract_class). It used to be contract, then model.
  • v0.3.1 Changes

    • Autoload Dispatch.
  • v0.3.0 Changes

    ๐Ÿ”„ Changes

    • In Railtie, use ActionDispatch::Reloader.to_prepare for autoloading, nothing else. This should fix spring reloading.
    • ๐Ÿ‘ Allow Op#validate(params, model, Contract) with CRUD.
    • ๐Ÿ‘ Allows prefixed table names, e.g. admin.users in Controller. The instance variables will be @user. Thanks to @fernandes and especially @HuckyDucky.
    • โž• Added Operation::Collection which will allow additional behavior like pagination and scoping. Thanks to @fernandes for his work on this.
    • โž• Added Operation::collection to run setup! without instantiating a contract. This is called in the new Controller#collection method.
    • โž• Added Operation#model as this is a fundamental concept now.
    • ๐Ÿ‘Œ Improved the undocumented Representer module which allows inferring representers from contract, using them to deserialize documents for the form, and rendering documents.
    • ๐Ÿ”„ Changed Operation::Dispatch which now provides imperative callbacks.

    API change

    1. The return value of #process is no longer returned from ::run and ::call. They always return the operation instance.
    2. The return value of #validate is true or false. This allows a more intuitive operation body.

      def process(params)
        if validate(params)
          .. do valid
          .. handle invalid
    • ๐Ÿ‘ท Worker only works with Reform >= 2.0.0.
  • v0.2.3