Browse Source

lk | fixes a bunch of references to agency_name

master
Louis Knapp 9 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
= f.label "Agency:", class: "col-sm-2 control-label"
.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
= 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.name
%br
= client.agency.agency_name if client.agency
= client.agency.name if client.agency
.horizontal-line
%br
Includes:
@ -42,7 +42,7 @@
.client-information
= client.name
%br
= client.agency.agency_name if client.agency
= client.agency.name if client.agency
.horizontal-line
.row
.col-xs-6

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

@ -23,7 +23,7 @@
%td= client.last_name
%td= client.height
%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= link_to 'Edit', edit_client_path(client)
@ -43,7 +43,7 @@
%tr
%td= client.first_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)
%br

3
lib/tasks/dummydata.rake

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

Loading…
Cancel
Save