Browse Source

lk | fixes a bunch of references to agency_name

master
Louis Knapp 8 years ago
parent
commit
7fdf4f7d02
  1. 2
      app/views/clients/_fields.html.haml
  2. 4
      app/views/clients/_receipt.html.haml
  3. 4
      app/views/clients/index.html.haml
  4. 3
      lib/tasks/dummydata.rake

2
app/views/clients/_fields.html.haml

@ -38,7 +38,7 @@
.form-group .form-group
= f.label "Agency:", class: "col-sm-2 control-label" = f.label "Agency:", class: "col-sm-2 control-label"
.col-sm-10 .col-sm-10
= f.select :agency_id, Agency.order(:agency_name).collect {|b| [ b.agency_name, b.id ] }, {include_blank: 'None'}, class: "selectpicker", disabled: disabled = f.select :agency_id, Agency.order(:name).collect {|b| [ b.name, b.id ] }, {include_blank: 'None'}, class: "selectpicker", disabled: disabled
.form-group .form-group
= f.label "Type of Bike Requested:", class: "col-sm-2 control-label" = f.label "Type of Bike Requested:", class: "col-sm-2 control-label"

4
app/views/clients/_receipt.html.haml

@ -7,7 +7,7 @@
.client-information .client-information
= client.name = client.name
%br %br
= client.agency.agency_name if client.agency = client.agency.name if client.agency
.horizontal-line .horizontal-line
%br %br
Includes: Includes:
@ -42,7 +42,7 @@
.client-information .client-information
= client.name = client.name
%br %br
= client.agency.agency_name if client.agency = client.agency.name if client.agency
.horizontal-line .horizontal-line
.row .row
.col-xs-6 .col-xs-6

4
app/views/clients/index.html.haml

@ -23,7 +23,7 @@
%td= client.last_name %td= client.last_name
%td= client.height %td= client.height
%td= client.application_date %td= client.application_date
%td= client.agency.agency_name if client.agency %td= client.agency.name if client.agency
%td= client.bike_id ? Bike.find(client.bike_id).name : "None" %td= client.bike_id ? Bike.find(client.bike_id).name : "None"
%td= link_to 'Edit', edit_client_path(client) %td= link_to 'Edit', edit_client_path(client)
@ -43,7 +43,7 @@
%tr %tr
%td= client.first_name %td= client.first_name
%td= client.last_name %td= client.last_name
%td= client.agency.agency_name if client.agency %td= client.agency.name if client.agency
%td= link_to 'Edit', edit_client_path(client) %td= link_to 'Edit', edit_client_path(client)
%br %br

3
lib/tasks/dummydata.rake

@ -10,11 +10,10 @@ namespace :db do
Client.destroy_all Client.destroy_all
puts "clearing agencies" puts "clearing agencies"
Agency.destroy_all Agency.destroy_all
def random_agency def random_agency
return { return {
agency_name: Faker::Company.name, name: Faker::Company.name,
contact_name: Faker::Name.name, contact_name: Faker::Name.name,
street_address: Faker::Address.street_address, street_address: Faker::Address.street_address,
city: Faker::Address.city, city: Faker::Address.city,

Loading…
Cancel
Save