Permalink
Browse files

fixes to make it working

small hack because try method on meta data didn't want to work
  • Loading branch information...
1 parent e52dbf1 commit f3abc211a135069fc869e6068d5616805475fbb0 @kritik kritik committed May 19, 2011
@@ -9,7 +9,7 @@ def index
end
create.success do
- wants.html { redirect_to object }
+ wants.html { redirect_to contact_path(object) }
end
end
View
@@ -14,4 +14,12 @@ def deliver_notification_email
RAILS_DEFAULT_LOGGER.warn("Inquiry mailer failed to send mail due to the contact email being undefined")
end
+ def meta_keywords
+ Spree::Config[:default_meta_keywords]
+ end
+
+ def meta_description
+ Spree::Config[:default_meta_description]
+ end
+
end
@@ -2,19 +2,12 @@
<div id="contact_form">
- <% form_for(:inquiry) do |f| %>
+ <%= form_for(@inquiry, :url => contact_index_path) do |f| %>
<fieldset>
<legend><%= t('Fill_out_the_fields_to_contact_us') %></legend>
<div class="formFieldsWrapper">
-
- <% unless @inquiry && !@inquiry.errors.count.zero? %>
- <%= render :partial => 'shared/contact_info' %>
- <% else %>
- <div class="errors">
- <%= error_messages_for :inquiry %>
- </div>
- <% end %>
+ <%= render "shared/error_messages", :target => @inquiry %>
<p class="field">
<%= f.label :name, t('name') %>
View
@@ -1,6 +1,7 @@
Rails.application.routes.draw do
resources :inquiries, :as => 'contact'
+ match "contact", :to => "inquiries#index"
namespace :admin do
resources :inquiries
@@ -13,6 +13,7 @@ form label {
display: inline-block;
line-height: 1.8;
vertical-align: top;
+ float:left;
}
form fieldset ol {
margin: 0;

0 comments on commit f3abc21

Please sign in to comment.