clearance 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of clearance might be problematic. Click here for more details.
- data/CHANGELOG.md +6 -0
- data/README.md +15 -4
- data/VERSION +1 -1
- data/app/controllers/clearance/passwords_controller.rb +14 -6
- data/lib/clearance.rb +0 -3
- data/lib/clearance/shoulda_macros.rb +1 -176
- data/lib/rails/generators/clearance_features_templates/features/password_reset.feature +4 -3
- data/lib/rails/generators/clearance_features_templates/features/sign_in.feature +3 -2
- data/lib/rails/generators/clearance_features_templates/features/sign_out.feature +4 -3
- data/lib/rails/generators/clearance_features_templates/features/sign_up.feature +3 -2
- data/lib/rails/generators/clearance_features_templates/features/step_definitions/clearance_steps.rb +2 -10
- data/spec/rails_root/Gemfile.lock +143 -0
- data/spec/rails_root/app/views/passwords/edit.html.erb +21 -0
- data/spec/rails_root/app/views/passwords/new.html.erb +15 -0
- data/spec/rails_root/app/views/sessions/new.html.erb +21 -0
- data/spec/rails_root/app/views/users/_inputs.html.erb +6 -0
- data/spec/rails_root/app/views/users/new.html.erb +10 -0
- data/spec/rails_root/db/development.sqlite3 +0 -0
- data/spec/rails_root/db/migrate/20110209234521_clearance_create_users.rb +19 -0
- data/spec/rails_root/db/schema.rb +28 -0
- data/spec/rails_root/db/test.sqlite3 +0 -0
- data/spec/rails_root/features/password_reset.feature +40 -0
- data/spec/rails_root/features/sign_in.feature +28 -0
- data/spec/rails_root/features/sign_out.feature +16 -0
- data/spec/rails_root/features/sign_up.feature +21 -0
- data/spec/rails_root/features/step_definitions/clearance_steps.rb +109 -0
- data/spec/rails_root/log/development.log +536 -0
- data/spec/rails_root/log/test.log +7600 -0
- data/spec/rails_root/test/factories/clearance.rb +13 -0
- data/spec/rails_root/test/functional/accounts_controller_test.rb +22 -0
- data/spec/rails_root/test/performance/browsing_test.rb +9 -0
- data/spec/rails_root/test/test_helper.rb +13 -0
- data/spec/rails_root/vendor/Gemfile +17 -0
- data/spec/rails_root/vendor/Gemfile.lock +143 -0
- data/spec/rails_root/vendor/README +244 -0
- data/spec/rails_root/vendor/Rakefile +10 -0
- data/spec/rails_root/vendor/app/controllers/accounts_controller.rb +10 -0
- data/spec/rails_root/vendor/app/controllers/application_controller.rb +6 -0
- data/spec/rails_root/vendor/app/helpers/application_helper.rb +2 -0
- data/spec/rails_root/vendor/app/models/user.rb +3 -0
- data/spec/rails_root/vendor/app/views/accounts/edit.html.erb +0 -0
- data/spec/rails_root/vendor/app/views/layouts/application.html.erb +24 -0
- data/spec/rails_root/vendor/app/views/passwords/edit.html.erb +21 -0
- data/spec/rails_root/vendor/app/views/passwords/new.html.erb +15 -0
- data/spec/rails_root/vendor/app/views/sessions/new.html.erb +21 -0
- data/spec/rails_root/vendor/app/views/users/_inputs.html.erb +6 -0
- data/spec/rails_root/vendor/app/views/users/new.html.erb +10 -0
- data/spec/rails_root/vendor/config.ru +4 -0
- data/spec/rails_root/vendor/config/application.rb +46 -0
- data/spec/rails_root/vendor/config/boot.rb +6 -0
- data/spec/rails_root/vendor/config/cucumber.yml +8 -0
- data/spec/rails_root/vendor/config/database.yml +25 -0
- data/spec/rails_root/vendor/config/environment.rb +7 -0
- data/spec/rails_root/vendor/config/environments/development.rb +21 -0
- data/spec/rails_root/vendor/config/environments/production.rb +42 -0
- data/spec/rails_root/vendor/config/environments/test.rb +34 -0
- data/spec/rails_root/vendor/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/rails_root/vendor/config/initializers/clearance.rb +3 -0
- data/spec/rails_root/vendor/config/initializers/inflections.rb +10 -0
- data/spec/rails_root/vendor/config/initializers/mime_types.rb +5 -0
- data/spec/rails_root/vendor/config/initializers/secret_token.rb +7 -0
- data/spec/rails_root/vendor/config/initializers/session_store.rb +8 -0
- data/spec/rails_root/vendor/config/locales/en.yml +5 -0
- data/spec/rails_root/vendor/config/routes.rb +61 -0
- data/spec/rails_root/vendor/db/development.sqlite3 +0 -0
- data/spec/rails_root/vendor/db/migrate/20101220184900_clearance_create_users.rb +20 -0
- data/spec/rails_root/vendor/db/schema.rb +29 -0
- data/spec/rails_root/vendor/db/test.sqlite3 +0 -0
- data/spec/rails_root/vendor/doc/README_FOR_APP +2 -0
- data/spec/rails_root/vendor/features/password_reset.feature +33 -0
- data/spec/rails_root/vendor/features/sign_in.feature +35 -0
- data/spec/rails_root/vendor/features/sign_out.feature +15 -0
- data/spec/rails_root/vendor/features/sign_up.feature +45 -0
- data/spec/rails_root/vendor/features/step_definitions/clearance_steps.rb +138 -0
- data/spec/rails_root/vendor/features/step_definitions/web_steps.rb +219 -0
- data/spec/rails_root/vendor/features/support/env.rb +57 -0
- data/spec/rails_root/vendor/features/support/paths.rb +45 -0
- data/spec/rails_root/vendor/lib/tasks/cucumber.rake +53 -0
- data/spec/rails_root/vendor/log/development.log +663 -0
- data/spec/rails_root/vendor/log/test.log +22745 -0
- data/spec/rails_root/vendor/public/404.html +26 -0
- data/spec/rails_root/vendor/public/422.html +26 -0
- data/spec/rails_root/vendor/public/500.html +26 -0
- data/spec/rails_root/vendor/public/favicon.ico +0 -0
- data/spec/rails_root/vendor/public/images/rails.png +0 -0
- data/spec/rails_root/vendor/public/javascripts/application.js +2 -0
- data/spec/rails_root/vendor/public/javascripts/controls.js +965 -0
- data/spec/rails_root/vendor/public/javascripts/dragdrop.js +974 -0
- data/spec/rails_root/vendor/public/javascripts/effects.js +1123 -0
- data/spec/rails_root/vendor/public/javascripts/prototype.js +4874 -0
- data/spec/rails_root/vendor/public/javascripts/rails.js +118 -0
- data/spec/rails_root/vendor/public/robots.txt +5 -0
- data/spec/rails_root/vendor/script/cucumber +10 -0
- data/spec/rails_root/vendor/script/rails +9 -0
- data/spec/rails_root/vendor/test/factories/clearance.rb +13 -0
- data/spec/rails_root/vendor/test/functional/accounts_controller_test.rb +22 -0
- data/spec/rails_root/vendor/test/performance/browsing_test.rb +9 -0
- data/spec/rails_root/vendor/test/test_helper.rb +13 -0
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/MIT-LICENSE +20 -0
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/README +13 -0
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/Rakefile +10 -0
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/init.rb +5 -0
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb +300 -0
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/lib/action_view/locale/en.yml +8 -0
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb +42 -0
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/test/dynamic_form_test.rb +370 -0
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/test/test_helper.rb +9 -0
- data/test/controllers/passwords_controller_test.rb +19 -0
- data/test/models/clearance_mailer_test.rb +1 -1
- data/test/rails_root/Gemfile.lock +145 -0
- data/test/rails_root/app/views/passwords/edit.html.erb +21 -0
- data/test/rails_root/app/views/passwords/new.html.erb +15 -0
- data/test/rails_root/app/views/sessions/new.html.erb +21 -0
- data/test/rails_root/app/views/users/_inputs.html.erb +6 -0
- data/test/rails_root/app/views/users/new.html.erb +10 -0
- data/test/rails_root/db/development.sqlite3 +0 -0
- data/test/rails_root/db/migrate/20110209234101_clearance_create_users.rb +19 -0
- data/test/rails_root/db/schema.rb +28 -0
- data/test/rails_root/db/test.sqlite3 +0 -0
- data/test/rails_root/features/password_reset.feature +40 -0
- data/test/rails_root/features/sign_in.feature +28 -0
- data/test/rails_root/features/sign_out.feature +16 -0
- data/test/rails_root/features/sign_up.feature +21 -0
- data/test/rails_root/features/step_definitions/clearance_steps.rb +109 -0
- data/test/rails_root/log/development.log +938 -0
- data/test/rails_root/log/test.log +20303 -0
- data/test/test_helper.rb +1 -0
- metadata +263 -42
- data/clearance.gemspec +0 -198
- data/cucumber.yml +0 -4
- data/init.rb +0 -1
- data/lib/clearance/extensions/errors.rb +0 -6
- data/lib/clearance/extensions/rescue.rb +0 -5
@@ -0,0 +1,10 @@
|
|
1
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
+
|
4
|
+
require File.expand_path('../config/application', __FILE__)
|
5
|
+
|
6
|
+
require 'rake'
|
7
|
+
require 'rake/testtask'
|
8
|
+
require 'rake/rdoctask'
|
9
|
+
|
10
|
+
Rails3Root::Application.load_tasks
|
File without changes
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Rails3Root</title>
|
5
|
+
<%= stylesheet_link_tag :all %>
|
6
|
+
<%= javascript_include_tag :defaults %>
|
7
|
+
<%= csrf_meta_tag %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<div id="header">
|
11
|
+
<% if signed_in? -%>
|
12
|
+
<%= link_to "Sign out", sign_out_path, :method => :delete %>
|
13
|
+
<% else -%>
|
14
|
+
<%= link_to "Sign in", sign_in_path %>
|
15
|
+
<% end -%>
|
16
|
+
</div>
|
17
|
+
<div id="flash">
|
18
|
+
<% flash.each do |key, value| -%>
|
19
|
+
<div id="flash_<%= key %>"><%=h value %></div>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
22
|
+
<%= yield %>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<h2>Change your password</h2>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
Your password has been reset. Choose a new password below.
|
5
|
+
</p>
|
6
|
+
|
7
|
+
<%= semantic_form_for(:user,
|
8
|
+
:url => user_password_path(@user, :token => @user.confirmation_token),
|
9
|
+
:html => { :method => :put }) do |form| %>
|
10
|
+
<%= form.error_messages %>
|
11
|
+
<%= form.inputs do -%>
|
12
|
+
<%= form.input :password, :as => :password,
|
13
|
+
:label => "Choose password" %>
|
14
|
+
<%= form.input :password_confirmation, :as => :password,
|
15
|
+
:label => "Confirm password" %>
|
16
|
+
<% end -%>
|
17
|
+
<%= form.buttons do -%>
|
18
|
+
<%= form.commit_button "Save this password" %>
|
19
|
+
<% end -%>
|
20
|
+
<% end %>
|
21
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<h2>Reset your password</h2>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
We will email you a link to reset your password.
|
5
|
+
</p>
|
6
|
+
|
7
|
+
<%= semantic_form_for :password, :url => passwords_path do |form| -%>
|
8
|
+
<%= form.inputs do -%>
|
9
|
+
<%= form.input :email, :label => "Email address" %>
|
10
|
+
<% end -%>
|
11
|
+
<%= form.buttons do -%>
|
12
|
+
<%= form.commit_button "Reset password" %>
|
13
|
+
<% end -%>
|
14
|
+
<% end -%>
|
15
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<h2>Sign in</h2>
|
2
|
+
|
3
|
+
<%= semantic_form_for :session, :url => session_path do |form| %>
|
4
|
+
<%= form.inputs do %>
|
5
|
+
<%= form.input :email %>
|
6
|
+
<%= form.input :password, :as => :password %>
|
7
|
+
<% end %>
|
8
|
+
<%= form.buttons do %>
|
9
|
+
<%= form.commit_button "Sign in" %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<ul>
|
14
|
+
<li>
|
15
|
+
<%= link_to "Sign up", sign_up_path %>
|
16
|
+
</li>
|
17
|
+
<li>
|
18
|
+
<%= link_to "Forgot password?", new_password_path %>
|
19
|
+
</li>
|
20
|
+
</ul>
|
21
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# If you have a Gemfile, require the gems listed there, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
8
|
+
|
9
|
+
module Rails3Root
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Add additional load paths for your own custom dirs
|
16
|
+
# config.load_paths += %W( #{config.root}/extras )
|
17
|
+
|
18
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
19
|
+
# :all can be used as a placeholder for all plugins not explicitly named
|
20
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
21
|
+
|
22
|
+
# Activate observers that should always be running
|
23
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
24
|
+
|
25
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
26
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
27
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
28
|
+
|
29
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
30
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
31
|
+
# config.i18n.default_locale = :de
|
32
|
+
|
33
|
+
# Configure generators values. Many other options are available, be sure to check the documentation.
|
34
|
+
# config.generators do |g|
|
35
|
+
# g.orm :active_record
|
36
|
+
# g.template_engine :erb
|
37
|
+
# g.test_framework :test_unit, :fixture => true
|
38
|
+
# end
|
39
|
+
|
40
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
41
|
+
config.encoding = "utf-8"
|
42
|
+
|
43
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
44
|
+
config.filter_parameters += [:password]
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%
|
2
|
+
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
|
3
|
+
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
|
4
|
+
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip"
|
5
|
+
%>
|
6
|
+
default: <%= std_opts %> features
|
7
|
+
wip: --tags @wip:3 --wip features
|
8
|
+
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3-ruby (not necessary on OS X Leopard)
|
3
|
+
development:
|
4
|
+
adapter: sqlite3
|
5
|
+
database: db/development.sqlite3
|
6
|
+
pool: 5
|
7
|
+
timeout: 5000
|
8
|
+
|
9
|
+
# Warning: The database defined as "test" will be erased and
|
10
|
+
# re-generated from your development database when you run "rake".
|
11
|
+
# Do not set this db to the same as development or production.
|
12
|
+
test: &test
|
13
|
+
adapter: sqlite3
|
14
|
+
database: db/test.sqlite3
|
15
|
+
pool: 5
|
16
|
+
timeout: 5000
|
17
|
+
|
18
|
+
production:
|
19
|
+
adapter: sqlite3
|
20
|
+
database: db/production.sqlite3
|
21
|
+
pool: 5
|
22
|
+
timeout: 5000
|
23
|
+
|
24
|
+
cucumber:
|
25
|
+
<<: *test
|
@@ -0,0 +1,21 @@
|
|
1
|
+
Rails3Root::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the webserver when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_view.debug_rjs = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Don't care if the mailer can't send
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
19
|
+
|
20
|
+
config.active_support.deprecation = :stderr
|
21
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Rails3Root::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
3
|
+
|
4
|
+
# The production environment is meant for finished, "live" apps.
|
5
|
+
# Code is not reloaded between requests
|
6
|
+
config.cache_classes = true
|
7
|
+
|
8
|
+
# Full error reports are disabled and caching is turned on
|
9
|
+
config.consider_all_requests_local = false
|
10
|
+
config.action_controller.perform_caching = true
|
11
|
+
|
12
|
+
# Specifies the header that your server uses for sending files
|
13
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
+
|
15
|
+
# For nginx:
|
16
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
+
|
18
|
+
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
+
# just comment this out and Rails will serve the files
|
20
|
+
|
21
|
+
# See everything in the log (default is :info)
|
22
|
+
# config.log_level = :debug
|
23
|
+
|
24
|
+
# Use a different logger for distributed setups
|
25
|
+
# config.logger = SyslogLogger.new
|
26
|
+
|
27
|
+
# Use a different cache store in production
|
28
|
+
# config.cache_store = :mem_cache_store
|
29
|
+
|
30
|
+
# Disable Rails's static asset server
|
31
|
+
# In production, Apache or nginx will already do this
|
32
|
+
config.serve_static_assets = false
|
33
|
+
|
34
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
+
|
37
|
+
# Disable delivery errors, bad email addresses will be ignored
|
38
|
+
# config.action_mailer.raise_delivery_errors = false
|
39
|
+
|
40
|
+
# Enable threaded mode
|
41
|
+
# config.threadsafe!
|
42
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
Rails3Root::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
11
|
+
config.whiny_nils = true
|
12
|
+
|
13
|
+
# Show full error reports and disable caching
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Raise exceptions instead of rendering exception templates
|
18
|
+
config.action_dispatch.show_exceptions = false
|
19
|
+
|
20
|
+
# Disable request forgery protection in test environment
|
21
|
+
config.action_controller.allow_forgery_protection = false
|
22
|
+
|
23
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
+
# The :test delivery method accumulates sent emails in the
|
25
|
+
# ActionMailer::Base.deliveries array.
|
26
|
+
config.action_mailer.delivery_method = :test
|
27
|
+
|
28
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
+
# like if you have constraints or database-specific column types
|
31
|
+
# config.active_record.schema_format = :sql
|
32
|
+
|
33
|
+
config.active_support.deprecation = :stderr
|
34
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Rails.application.config.secret_token = 'b0a71f62c3707fe6874a435909a597203110c418dc3022773b5131e2a26a99b304010089bd3ebb92e206b3b94a883aeefa571a8a52a45160f8663d163786610c'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Rails.application.config.session_store :cookie_store, :key => '_rails3_root_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rake db:sessions:create")
|
8
|
+
# Rails.application.config.session_store :active_record_store
|
@@ -0,0 +1,61 @@
|
|
1
|
+
Rails3Root::Application.routes.draw do
|
2
|
+
resource :account
|
3
|
+
root :to => 'accounts#edit'
|
4
|
+
|
5
|
+
# The priority is based upon order of creation:
|
6
|
+
# first created -> highest priority.
|
7
|
+
|
8
|
+
# Sample of regular route:
|
9
|
+
# match 'products/:id' => 'catalog#view'
|
10
|
+
# Keep in mind you can assign values other than :controller and :action
|
11
|
+
|
12
|
+
# Sample of named route:
|
13
|
+
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
14
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
15
|
+
|
16
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
17
|
+
# resources :products
|
18
|
+
|
19
|
+
# Sample resource route with options:
|
20
|
+
# resources :products do
|
21
|
+
# member do
|
22
|
+
# get :short
|
23
|
+
# post :toggle
|
24
|
+
# end
|
25
|
+
#
|
26
|
+
# collection do
|
27
|
+
# get :sold
|
28
|
+
# end
|
29
|
+
# end
|
30
|
+
|
31
|
+
# Sample resource route with sub-resources:
|
32
|
+
# resources :products do
|
33
|
+
# resources :comments, :sales
|
34
|
+
# resource :seller
|
35
|
+
# end
|
36
|
+
|
37
|
+
# Sample resource route with more complex sub-resources
|
38
|
+
# resources :products do
|
39
|
+
# resources :comments
|
40
|
+
# resources :sales do
|
41
|
+
# get :recent, :on => :collection
|
42
|
+
# end
|
43
|
+
# end
|
44
|
+
|
45
|
+
# Sample resource route within a namespace:
|
46
|
+
# namespace :admin do
|
47
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
48
|
+
# # (app/controllers/admin/products_controller.rb)
|
49
|
+
# resources :products
|
50
|
+
# end
|
51
|
+
|
52
|
+
# You can have the root of your site routed with "root"
|
53
|
+
# just remember to delete public/index.html.
|
54
|
+
# root :to => "welcome#index"
|
55
|
+
|
56
|
+
# See how all your routes lay out with "rake routes"
|
57
|
+
|
58
|
+
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
59
|
+
# Note: This route will make all actions in every controller accessible via GET requests.
|
60
|
+
# match ':controller(/:action(/:id(.:format)))'
|
61
|
+
end
|