minor refactor of the repositories format methods.
fix bug, can't display new host form, nil has no method product_ids.
Merge pull request #22 from abenari/minor

	fix bug, can't display new host form, nil has no method product_ids.