diff --git a/app/assets/images/phone.jpg b/app/assets/images/phone.jpg index 1f5174a..cc036b6 100644 Binary files a/app/assets/images/phone.jpg and b/app/assets/images/phone.jpg differ diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 28c2bff..ffc6404 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -6,4 +6,8 @@ class ApplicationController < ActionController::Base def after_sign_in_path_for(resource) contacts_path end + + def default_url_options + { host: ENV["HOST"] || "localhost:3000" } + end end diff --git a/app/helpers/meta_tags_helper.rb b/app/helpers/meta_tags_helper.rb new file mode 100644 index 0000000..5353d9b --- /dev/null +++ b/app/helpers/meta_tags_helper.rb @@ -0,0 +1,15 @@ +module MetaTagsHelper + def meta_title + content_for?(:meta_title) ? content_for(:meta_title) : DEFAULT_META["meta_title"] + end + + def meta_description + content_for?(:meta_description) ? content_for(:meta_description) : DEFAULT_META["meta_description"] + end + + def meta_image + meta_image = (content_for?(:meta_image) ? content_for(:meta_image) : DEFAULT_META["meta_image"]) + # little twist to make it work equally with an asset or a url + meta_image.starts_with?("http") ? meta_image : image_url(meta_image) + end +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 99d6833..4a5ea09 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -3,12 +3,18 @@
- <%= favicon_link_tag 'favicon.ico' %> -You may have mistyped the address or the page may have moved.
-If you are the application owner check the logs for more information.
-Ethan, fix this
diff --git a/public/422.html b/public/422.html index c08eac0..0252968 100644 --- a/public/422.html +++ b/public/422.html @@ -1,67 +1,2 @@ - - - -Maybe you tried to change something you didn't have access to.
-If you are the application owner check the logs for more information.
-Ethan, fix this
diff --git a/public/500.html b/public/500.html index 78a030a..0252968 100644 --- a/public/500.html +++ b/public/500.html @@ -1,66 +1,2 @@ - - - -If you are the application owner check the logs for more information.
-Ethan, fix this