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

Use create_if_necessary instead of a simple find_or_initialize #3494

Commits on Feb 19, 2020

  1. Configuration menu
    Copy the full SHA
    df95ee0 View commit details
    Browse the repository at this point in the history
  2. Only pass the lock option to #find_order_by_token_or_user

    Restrict the number of options forwarded to
    #find_order_by_token_or_user since the only one it uses is :lock.
    elia committed Feb 19, 2020
    Configuration menu
    Copy the full SHA
    4bfe9a7 View commit details
    Browse the repository at this point in the history
  3. Avoid mutating the options hash passed order helpers

    The mutation had no practical purpose and by avoiding it we also save
    some cpu cycles.
    elia committed Feb 19, 2020
    Configuration menu
    Copy the full SHA
    aa5eaab View commit details
    Browse the repository at this point in the history
  4. Don't define top-level classes within specs

    The same result can easily be obtained with the #controller helper.
    
    Prior to this change the specs were interdependent and would have
    worked only when loaded together, hiding the dependency of one helper
    module on the others.
    elia committed Feb 19, 2020
    Configuration menu
    Copy the full SHA
    7c79a1c View commit details
    Browse the repository at this point in the history
  5. Let Order#record_ip_address work with new records

    If the order is being built it should keep setting the last_ip_address
    on the instance.
    elia committed Feb 19, 2020
    Configuration menu
    Copy the full SHA
    f40f627 View commit details
    Browse the repository at this point in the history
  6. Let current_order accept a build_order_if_necessary option

    This allows to easily build valid orders with all the expected
    metadata.
    elia committed Feb 19, 2020
    Configuration menu
    Copy the full SHA
    d90be78 View commit details
    Browse the repository at this point in the history
  7. Use current_order with build_if_necessary in cart page

    Using current_order with the newly introduced `build_if_necessary`
    option creates orders that are much more complete by adding info about
    the ip, the creator, and other meta data. It's also more readable.
    elia committed Feb 19, 2020
    Configuration menu
    Copy the full SHA
    030bf6c View commit details
    Browse the repository at this point in the history