Class: ShoppingCart::AddressDecorator
- Inherits:
-
Drape::Decorator
- Object
- Drape::Decorator
- ShoppingCart::AddressDecorator
- Defined in:
- app/decorators/shopping_cart/address_decorator.rb
Instance Method Summary collapse
Instance Method Details
#full_info ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'app/decorators/shopping_cart/address_decorator.rb', line 9 def full_info h.capture_haml do h.haml_tag :ul, class: 'list-unstyled' do h.haml_tag(:li) { h.haml_concat full_name } [:street, :city, :country_code, :zipcode, :phone].each do |field| h.haml_tag(:li) { h.haml_concat object.public_send(field) } end end end end |
#full_name ⇒ Object
5 6 7 |
# File 'app/decorators/shopping_cart/address_decorator.rb', line 5 def full_name "#{object.first_name} #{object.last_name}" end |