Katello/katello — pull request #430 by iNecas (2012-08-03 15:04:09+00:00)
Title: Introduce +load_remote_data+ method to lazy_attributes

When defined in your model, this method is used to transfer data from remote
source to instance variables when using lazy attributes.

It can be also used in the +initialize+ method to reduce the code duplicity.

This also allows having different names for the variables and keys in hash.

You can see the usage in +glue/candlepin/pool.rb+, where the problem with
different names occurred, causing:

Product has no product associated

when using activation key for registering and subscribing system to some
product.

Note:

This commit improved the system tests, so that they use subscriptions with activation keys. There is also another issue, displaying

Multi-entitlement not supported for pool with id {POOLID}

This is different issue and will be solved with anohter pull request (after finding out what's wrong)

@thomasmckay