Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parameters that take hash or array of hashes #327

Merged
merged 1 commit into from
Aug 28, 2013

Commits on Aug 28, 2013

  1. Fix parameters that take hash or array of hashes

    The method used to cast scalars to arrays is `Array()`. This also will
    cast `nil` to an empty array, and preserve array depth for existing
    arrays.
    
    Casting hashes to arrays with `Array()` produces strange results and so
    the more verbose form of `[hsh].flatten.compact` must be used when a
    parameter may be one or more hashes. This updates the tests and
    templates accordingly.
    hunner committed Aug 28, 2013
    Configuration menu
    Copy the full SHA
    866ffc9 View commit details
    Browse the repository at this point in the history