added rack validate

This commit is contained in:
scott 2010-03-06 10:23:02 -05:00
parent 1f6ba7297e
commit c15cb0813f
4 changed files with 8 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.sqlite3
*.log
*.*~

View File

@ -1,6 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%= csrf_meta_tag %>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js",
"http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js",
:defaults %>

View File

@ -27,7 +27,7 @@ Rails::Initializer.run do |config|
config.gem 'faker'
config.gem 'mysql'
config.gem "matthuhiggins-foreigner", :lib => "foreigner", :source => "http://gemcutter.org"
config.gem 'rack-validate'
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
@ -42,8 +42,9 @@ Rails::Initializer.run do |config|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names.
config.time_zone = 'UTC'
require 'rack-validate'
config.middleware.use Rack::Validate
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
# config.i18n.default_locale = :de
end
end

View File

@ -4,7 +4,7 @@
}
h1 {
padding-top:10px
margin-top:10px
}
div.flash {