Louis Knapp
8 years ago
7 changed files with 27 additions and 21 deletions
@ -1,11 +1,11 @@ |
|||||
= form_for @agency, html: {class: 'form-horizontal'} do |f| |
= form_for @agency, html: {class: 'form-horizontal'} do |f| |
||||
- if @agency.errors.any? |
- if @agency.errors.any? |
||||
#error_explanation |
#error_explanation |
||||
%h2= pluralize(@agency.errors.count, "error") + " prohibited this agency from being saved:" |
%h2= pluralize(@agency.errors.count, "error") + " prohibited this agency from being saved:" |
||||
%ul |
%ul |
||||
- @agency.errors.full_messages.each do |msg| |
- @agency.errors.full_messages.each do |msg| |
||||
%li= msg |
%li= msg |
||||
= render 'fields', f: f |
= render 'fields', f: f |
||||
.row |
.row |
||||
.actions.col-sm-offset-2 |
.actions.col-sm-offset-2 |
||||
= f.submit class: "btn btn-default" |
= f.submit class: "btn btn-default" |
||||
|
@ -1,6 +1,6 @@ |
|||||
.container |
.container |
||||
%h1 Edit Agency |
%h1 Edit Agency |
||||
= render 'form' |
= render 'form' |
||||
= link_to 'Show', @agency |
= link_to 'Show', @agency |
||||
| |
| |
||||
= link_to 'Back', agencies_path |
= 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