initialize test framenwork and add form handlers for newsletter and contact forms

This commit is contained in:
2012-04-02 18:04:47 +02:00
parent 653275a0f8
commit 2ef63f0517
29 changed files with 993 additions and 55 deletions
+11
View File
@@ -6,6 +6,9 @@ en:
are_you_sure: 'Are you sure?'
are_you_sure_with_name: 'Are you sure you want to delete %{model} %{name}?'
empty_result: No %{models} found
menu:
forms:
title: Form
action:
index:
title: List %{models}
@@ -30,6 +33,12 @@ en:
label: Add %{image}
news:
remove_image: Remove image
newsletter_subscription:
subscribed: You subscribed successfully to the newsletter
subscription_failed: 'There was a problem with your subscription<br/>%{reason}'
contact_form:
submitted: You successfully submitted the contact form
submission_failed: 'There was a problem with the contact form submission<br/>%{reason}'
quote:
remove_image: Remove image
sessions:
@@ -39,6 +48,8 @@ en:
errors:
form:
title: 'The action could not be completed because of %{count} reasons'
warnings:
no_host_specified: 'You did not specify a host in config/environments/:env (config.action_mailer.default_url_options = { :host => "example.com" })'
activemodel:
models:
page: Page
+6 -2
View File
@@ -26,8 +26,12 @@ Cmtool::Engine.routes.draw do
end
# ADMIN FORMS
resources :contact_forms
resources :newsletter_subscriptions
resources :contact_forms do
post :add
end
resources :newsletter_subscriptions do
post :add
end
# USER MANAGEMENT
resources :users