Sha256: e56c6035bb36cd2f111fd20951cd3d6a84d58144e4148f7416037666e5770175
Contents?: true
Size: 1.45 KB
Versions: 1
Compression:
Stored size: 1.45 KB
Contents
- address.country = Gemgento::Country.find_by(iso2_code: 'us') if address.country.nil? = form_for [:user, address] do |f| .col-md-5 .form-group = f.label :first_name, "first name" = f.text_field :first_name, class: 'form-control' .form-group = f.label :last_name, "last name" = f.text_field :last_name, class: 'form-control' .form-group = f.label :address1, "address 1" = f.text_field :address1, class: 'form-control' .form-group = f.label :address2, "address 2" = f.text_field :address2, class: 'form-control' .form-group = f.label :city, "city" = f.text_field :city, class: 'form-control' .form-group = f.label 'country_id', 'country' = f.collection_select :country_id, Gemgento::Country.all, :id, :name, {}, class: 'form-control' .form-group - regions = [] - if country = address.country - regions = Gemgento::Region.where(country: country) .form-group = f.label 'region_id', 'state' = f.collection_select 'region_id', regions, :id, :name, {}, class: 'region-selector', class: 'form-control' .form-group = f.label :zip, "zip" = f.text_field :postcode, class: 'form-control' .form-group = f.label :phone, "phone" = f.text_field :telephone, class: 'form-control' .form-group = link_to 'cancel', "/user/addresses", class: "cancel fancylink" .form-group = f.submit 'save', class: 'submit btn'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gemgento-2.8.0 | app/views/gemgento/user/addresses/_form.haml |