Louis Knapp
9 years ago
7 changed files with 27 additions and 21 deletions
@ -1,11 +1,11 @@ |
|||
= form_for @agency, html: {class: 'form-horizontal'} do |f| |
|||
- if @agency.errors.any? |
|||
- if @agency.errors.any? |
|||
#error_explanation |
|||
%h2= pluralize(@agency.errors.count, "error") + " prohibited this agency from being saved:" |
|||
%ul |
|||
- @agency.errors.full_messages.each do |msg| |
|||
%li= msg |
|||
= render 'fields', f: f |
|||
%li= msg |
|||
= render 'fields', f: f |
|||
.row |
|||
.actions.col-sm-offset-2 |
|||
= f.submit class: "btn btn-default" |
|||
|
@ -1,6 +1,6 @@ |
|||
.container |
|||
%h1 Edit Agency |
|||
= render 'form' |
|||
%h1 Edit Agency |
|||
= render 'form' |
|||
= link_to 'Show', @agency |
|||
| |
|||
= link_to 'Back', agencies_path |
|||
|
@ -0,0 +1,6 @@ |
|||
class ChangeAgencyPhoneNumberToAgencyPhone < ActiveRecord::Migration |
|||
def change |
|||
rename_column :agencies, :phone_number, :phone |
|||
rename_column :agencies, :agency_name, :name |
|||
end |
|||
end |
Loading…
Reference in new issue