Padrino

Upgrading Padrino from 0.12.X to 0.13.0 Guide

This is the step-by-step guide for upgrading from Padrino 0.12.X to 0.13.0! This will review all the breaking changes and modifications made within the new release. Be sure to also check the 0.13.0 Release Blog Post for more information.

Deprecated Features Removed

Several deprecated methods were removed in this release including:

  • #link_to with :fragment
    • Use :fragment for #url instead: url(:controller, :action, :fragment => "foo")
  • Application#load_paths, Padrino.set_load_paths, Padrino.load_paths
    • To set, use $LOAD_PATH.concat(paths)
    • To get, use Padrino.prerequisites instead
    • deprecated caching methods
    • methods including #get, #set, #flush (see more here)
  • deprecated form builder methods
    • methods including field_error and nested_form? (see more here")
  • #fetch_template_file, #cache_template_file!, #resolved_layout rendering methods
    • No replacement exists
  • String#undent
    • No replacement exists

Helper Changes

There are a few helper changes to be aware of:

  • select_tag used to be fairly ambiguous when specifying “selected” options. The ambiguity has been removed by always relying on the “value” where possible.
    • Switch your :selected options to indicate the value of the option wherever possible. (see more here)

New Routing System

Subtle differences likely exist between the old http_router and the new mustermann powered system. These differences include:

  • Splat arguments in URL are now a string rather than an array
    • get :show, :map => "/show/*name" used to return params[:name] as an array. Now this is a string.

Contribute

Please report any issues you encounter with this release! We are working very actively on Padrino and want to make the framework as stable and reliable as possible. That concludes the changelog for this release. As always if you want to keep up with Padrino updates, be sure to follow us on twitter: @padrinorb, join us on IRC at “#padrino” on freenode, open an issue, or discuss on gitter.


comments powered by Disqus