Permalink
Browse files

Initial commit with user and authlogic sessions

  • Loading branch information...
0 parents commit 3815d0f1c997230fb9be8a1c517e596de8d7a722 Carl Tanner committed Jul 7, 2009
Showing with 11,239 additions and 0 deletions.
  1. +243 −0 README
  2. +10 −0 Rakefile
  3. +24 −0 app/controllers/application_controller.rb
  4. +5 −0 app/controllers/front_door_controller.rb
  5. +22 −0 app/controllers/user_sessions_controller.rb
  6. +29 −0 app/controllers/users_controller.rb
  7. +47 −0 app/helpers/application_helper.rb
  8. +2 −0 app/helpers/front_door_helper.rb
  9. +23 −0 app/helpers/layout_helper.rb
  10. +2 −0 app/helpers/user_sessions_helper.rb
  11. +2 −0 app/helpers/users_helper.rb
  12. +3 −0 app/models/user.rb
  13. +2 −0 app/models/user_session.rb
  14. +2 −0 app/views/front_door/index.html.erb
  15. +32 −0 app/views/layouts/application.html.erb
  16. +17 −0 app/views/layouts/usersOld.html.erb
  17. +127 −0 app/views/shared/_ft_inner_html.html.erb
  18. +467 −0 app/views/shared/_hd_inner_html.html.erb
  19. +1 −0 app/views/shared/_ie_stylsheets.html.erb
  20. +3 −0 app/views/shared/_mobile_message.html.erb
  21. +1 −0 app/views/shared/_rss_feeds.html.erb
  22. +99 −0 app/views/shared/_sidebar.html.erb
  23. +5 −0 app/views/shared/_stylesheets.html.erb
  24. 0 app/views/user_sessions/index.html.erb
  25. +16 −0 app/views/user_sessions/new.html.erb
  26. +20 −0 app/views/users/_form.html.erb
  27. +4 −0 app/views/users/edit.html.erb
  28. +24 −0 app/views/users/index.html.erb
  29. +4 −0 app/views/users/new.html.erb
  30. +18 −0 app/views/users/show.html.erb
  31. +110 −0 config/boot.rb
  32. +22 −0 config/database.yml
  33. +44 −0 config/environment.rb
  34. +17 −0 config/environments/development.rb
  35. +28 −0 config/environments/production.rb
  36. +28 −0 config/environments/test.rb
  37. +7 −0 config/initializers/backtrace_silencers.rb
  38. +10 −0 config/initializers/inflections.rb
  39. +5 −0 config/initializers/mime_types.rb
  40. +19 −0 config/initializers/new_rails_defaults.rb
  41. +15 −0 config/initializers/session_store.rb
  42. +5 −0 config/locales/en.yml
  43. +54 −0 config/routes.rb
  44. BIN db/development.sqlite3
  45. +16 −0 db/migrate/20090707042709_create_users.rb
  46. +24 −0 db/schema.rb
  47. +2 −0 doc/README_FOR_APP
  48. +1,514 −0 log/development.log
  49. 0 log/production.log
  50. 0 log/server.log
  51. 0 log/test.log
  52. +30 −0 public/404.html
  53. +30 −0 public/422.html
  54. +30 −0 public/500.html
  55. 0 public/favicon.ico
  56. BIN public/images/rails.png
  57. +275 −0 public/indexOld.html
  58. +2 −0 public/javascripts/application.js
  59. +963 −0 public/javascripts/controls.js
  60. +973 −0 public/javascripts/dragdrop.js
  61. +1,128 −0 public/javascripts/effects.js
  62. +4,320 −0 public/javascripts/prototype.js
  63. +5 −0 public/robots.txt
  64. +81 −0 public/stylesheets/application.css
  65. +54 −0 public/stylesheets/scaffold.css
  66. +4 −0 script/about
  67. +3 −0 script/console
  68. +3 −0 script/dbconsole
  69. +3 −0 script/destroy
  70. +3 −0 script/generate
  71. +3 −0 script/performance/benchmarker
  72. +3 −0 script/performance/profiler
  73. +3 −0 script/plugin
  74. +3 −0 script/runner
  75. +3 −0 script/server
  76. +9 −0 test/fixtures/users.yml
  77. +8 −0 test/functional/front_door_controller_test.rb
  78. +27 −0 test/functional/user_sessions_controller_test.rb
  79. +37 −0 test/functional/users_controller_test.rb
  80. +9 −0 test/performance/browsing_test.rb
  81. +38 −0 test/test_helper.rb
  82. +4 −0 test/unit/helpers/front_door_helper_test.rb
  83. +4 −0 test/unit/helpers/users_helper_test.rb
  84. +7 −0 test/unit/user_test.rb
243 README
@@ -0,0 +1,243 @@
+== Welcome to Rails
+
+Rails is a web-application framework that includes everything needed to create
+database-backed web applications according to the Model-View-Control pattern.
+
+This pattern splits the view (also called the presentation) into "dumb" templates
+that are primarily responsible for inserting pre-built data in between HTML tags.
+The model contains the "smart" domain objects (such as Account, Product, Person,
+Post) that holds all the business logic and knows how to persist themselves to
+a database. The controller handles the incoming requests (such as Save New Account,
+Update Product, Show Post) by manipulating the model and directing data to the view.
+
+In Rails, the model is handled by what's called an object-relational mapping
+layer entitled Active Record. This layer allows you to present the data from
+database rows as objects and embellish these data objects with business logic
+methods. You can read more about Active Record in
+link:files/vendor/rails/activerecord/README.html.
+
+The controller and view are handled by the Action Pack, which handles both
+layers by its two parts: Action View and Action Controller. These two layers
+are bundled in a single package due to their heavy interdependence. This is
+unlike the relationship between the Active Record and Action Pack that is much
+more separate. Each of these packages can be used independently outside of
+Rails. You can read more about Action Pack in
+link:files/vendor/rails/actionpack/README.html.
+
+
+== Getting Started
+
+1. At the command prompt, start a new Rails application using the <tt>rails</tt> command
+ and your application name. Ex: rails myapp
+2. Change directory into myapp and start the web server: <tt>script/server</tt> (run with --help for options)
+3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!"
+4. Follow the guidelines to start developing your application
+
+
+== Web Servers
+
+By default, Rails will try to use Mongrel if it's are installed when started with script/server, otherwise Rails will use WEBrick, the webserver that ships with Ruby. But you can also use Rails
+with a variety of other web servers.
+
+Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is
+suitable for development and deployment of Rails applications. If you have Ruby Gems installed,
+getting up and running with mongrel is as easy as: <tt>gem install mongrel</tt>.
+More info at: http://mongrel.rubyforge.org
+
+Say other Ruby web servers like Thin and Ebb or regular web servers like Apache or LiteSpeed or
+Lighttpd or IIS. The Ruby web servers are run through Rack and the latter can either be setup to use
+FCGI or proxy to a pack of Mongrels/Thin/Ebb servers.
+
+== Apache .htaccess example for FCGI/CGI
+
+# General Apache options
+AddHandler fastcgi-script .fcgi
+AddHandler cgi-script .cgi
+Options +FollowSymLinks +ExecCGI
+
+# If you don't want Rails to look in certain directories,
+# use the following rewrite rules so that Apache won't rewrite certain requests
+#
+# Example:
+# RewriteCond %{REQUEST_URI} ^/notrails.*
+# RewriteRule .* - [L]
+
+# Redirect all requests not available on the filesystem to Rails
+# By default the cgi dispatcher is used which is very slow
+#
+# For better performance replace the dispatcher with the fastcgi one
+#
+# Example:
+# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
+RewriteEngine On
+
+# If your Rails application is accessed via an Alias directive,
+# then you MUST also set the RewriteBase in this htaccess file.
+#
+# Example:
+# Alias /myrailsapp /path/to/myrailsapp/public
+# RewriteBase /myrailsapp
+
+RewriteRule ^$ index.html [QSA]
+RewriteRule ^([^.]+)$ $1.html [QSA]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
+
+# In case Rails experiences terminal errors
+# Instead of displaying this message you can supply a file here which will be rendered instead
+#
+# Example:
+# ErrorDocument 500 /500.html
+
+ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
+
+
+== Debugging Rails
+
+Sometimes your application goes wrong. Fortunately there are a lot of tools that
+will help you debug it and get it back on the rails.
+
+First area to check is the application log files. Have "tail -f" commands running
+on the server.log and development.log. Rails will automatically display debugging
+and runtime information to these files. Debugging info will also be shown in the
+browser on requests from 127.0.0.1.
+
+You can also log your own messages directly into the log file from your code using
+the Ruby logger class from inside your controllers. Example:
+
+ class WeblogController < ActionController::Base
+ def destroy
+ @weblog = Weblog.find(params[:id])
+ @weblog.destroy
+ logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
+ end
+ end
+
+The result will be a message in your log file along the lines of:
+
+ Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1
+
+More information on how to use the logger is at http://www.ruby-doc.org/core/
+
+Also, Ruby documentation can be found at http://www.ruby-lang.org/ including:
+
+* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/
+* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
+
+These two online (and free) books will bring you up to speed on the Ruby language
+and also on programming in general.
+
+
+== Debugger
+
+Debugger support is available through the debugger command when you start your Mongrel or
+Webrick server with --debugger. This means that you can break out of execution at any point
+in the code, investigate and change the model, AND then resume execution!
+You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
+Example:
+
+ class WeblogController < ActionController::Base
+ def index
+ @posts = Post.find(:all)
+ debugger
+ end
+ end
+
+So the controller will accept the action, run the first line, then present you
+with a IRB prompt in the server window. Here you can do things like:
+
+ >> @posts.inspect
+ => "[#<Post:0x14a6be8 @attributes={\"title\"=>nil, \"body\"=>nil, \"id\"=>\"1\"}>,
+ #<Post:0x14a6620 @attributes={\"title\"=>\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]"
+ >> @posts.first.title = "hello from a debugger"
+ => "hello from a debugger"
+
+...and even better is that you can examine how your runtime objects actually work:
+
+ >> f = @posts.first
+ => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
+ >> f.
+ Display all 152 possibilities? (y or n)
+
+Finally, when you're ready to resume execution, you enter "cont"
+
+
+== Console
+
+You can interact with the domain model by starting the console through <tt>script/console</tt>.
+Here you'll have all parts of the application configured, just like it is when the
+application is running. You can inspect domain models, change values, and save to the
+database. Starting the script without arguments will launch it in the development environment.
+Passing an argument will specify a different environment, like <tt>script/console production</tt>.
+
+To reload your controllers and models after launching the console run <tt>reload!</tt>
+
+== dbconsole
+
+You can go to the command line of your database directly through <tt>script/dbconsole</tt>.
+You would be connected to the database with the credentials defined in database.yml.
+Starting the script without arguments will connect you to the development database. Passing an
+argument will connect you to a different database, like <tt>script/dbconsole production</tt>.
+Currently works for mysql, postgresql and sqlite.
+
+== Description of Contents
+
+app
+ Holds all the code that's specific to this particular application.
+
+app/controllers
+ Holds controllers that should be named like weblogs_controller.rb for
+ automated URL mapping. All controllers should descend from ApplicationController
+ which itself descends from ActionController::Base.
+
+app/models
+ Holds models that should be named like post.rb.
+ Most models will descend from ActiveRecord::Base.
+
+app/views
+ Holds the template files for the view that should be named like
+ weblogs/index.html.erb for the WeblogsController#index action. All views use eRuby
+ syntax.
+
+app/views/layouts
+ Holds the template files for layouts to be used with views. This models the common
+ header/footer method of wrapping views. In your views, define a layout using the
+ <tt>layout :default</tt> and create a file named default.html.erb. Inside default.html.erb,
+ call <% yield %> to render the view using this layout.
+
+app/helpers
+ Holds view helpers that should be named like weblogs_helper.rb. These are generated
+ for you automatically when using script/generate for controllers. Helpers can be used to
+ wrap functionality for your views into methods.
+
+config
+ Configuration files for the Rails environment, the routing map, the database, and other dependencies.
+
+db
+ Contains the database schema in schema.rb. db/migrate contains all
+ the sequence of Migrations for your schema.
+
+doc
+ This directory is where your application documentation will be stored when generated
+ using <tt>rake doc:app</tt>
+
+lib
+ Application specific libraries. Basically, any kind of custom code that doesn't
+ belong under controllers, models, or helpers. This directory is in the load path.
+
+public
+ The directory available for the web server. Contains subdirectories for images, stylesheets,
+ and javascripts. Also contains the dispatchers and the default HTML files. This should be
+ set as the DOCUMENT_ROOT of your web server.
+
+script
+ Helper scripts for automation and generation.
+
+test
+ Unit and functional tests along with fixtures. When using the script/generate scripts, template
+ test files will be generated for you and placed in this directory.
+
+vendor
+ External libraries that the application depends on. Also includes the plugins subdirectory.
+ If the app has frozen rails, those gems also go here, under vendor/rails/.
+ This directory is in the load path.
10 Rakefile
@@ -0,0 +1,10 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require(File.join(File.dirname(__FILE__), 'config', 'boot'))
+
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+
+require 'tasks/rails'
24 app/controllers/application_controller.rb
@@ -0,0 +1,24 @@
+# Filters added to this controller apply to all controllers in the application.
+# Likewise, all the methods added will be available for all controllers.
+
+class ApplicationController < ActionController::Base
+ helper :all # include all helpers, all the time
+ protect_from_forgery # See ActionController::RequestForgeryProtection for details
+
+ # Scrub sensitive parameters from your log
+ # filter_parameter_logging :password
+
+ helper_method :current_user
+
+ private
+
+ def current_user_session
+ return @current_user_session if defined?(@current_user_session)
+ @current_user_session = UserSession.find
+ end
+
+ def current_user
+ return @current_user if defined?(@current_user)
+ @current_user = current_user_session && current_user_session.record
+ end
+end
5 app/controllers/front_door_controller.rb
@@ -0,0 +1,5 @@
+class FrontDoorController < ApplicationController
+ def index
+ end
+
+end
22 app/controllers/user_sessions_controller.rb
@@ -0,0 +1,22 @@
+class UserSessionsController < ApplicationController
+ def new
+ @user_session = UserSession.new
+ end
+
+ def create
+ @user_session = UserSession.new(params[:user_session])
+ if @user_session.save
+ flash[:notice] = "Successfully logged in."
+ redirect_to root_url
+ else
+ render :action => 'new'
+ end
+ end
+
+ def destroy
+ @user_session = UserSession.find
+ @user_session.destroy
+ flash[:notice] = "Successfully logged out."
+ redirect_to root_url
+ end
+end
29 app/controllers/users_controller.rb
@@ -0,0 +1,29 @@
+class UsersController < ApplicationController
+ def new
+ @user = User.new
+ end
+
+ def create
+ @user = User.new(params[:user])
+ if @user.save
+ flash[:notice] = "Registration successful."
+ redirect_to root_url
+ else
+ render :action => 'new'
+ end
+ end
+
+ def edit
+ @user = current_user
+ end
+
+ def update
+ @user = User.find(params[:id])
+ if @user.update_attributes(params[:user])
+ flash[:notice] = "Successfully updated profile."
+ redirect_to root_url
+ else
+ render :action => 'edit'
+ end
+ end
+end
47 app/helpers/application_helper.rb
@@ -0,0 +1,47 @@
+# Methods added to this helper will be available to all templates in the application.
+module ApplicationHelper
+ def page_title
+ title = @page_title ? "| #{@page_title}" : ''
+ %(Good Food #{title})
+ end
+
+ def title
+ title = @page_title ? "| #{@page_title}" : ''
+ %(Good Food #{title})
+ end
+
+ def page_classes
+ page_class = @page_classes ? "#{@page_classes}" : ''
+ %(class="#{page_class} ")
+ end
+
+ def page_template
+ page_template = @page_template ? "#{@page_template}" : 'id="custom-doc" class="yui-t6"'
+ end
+
+ # Show the local time
+ def tz(time_at)
+ Time.zone.utc_to_local(time_at.utc)
+ end
+
+ def menu_boards
+
+ end
+
+ def toggle_div(div)
+ update_page do |page|
+ page[div].toggle
+ page[div].visual_effect :highlight
+ end
+ end
+
+ def photo_for(user, size=:thumb)
+ if user.profile_photo
+ src = user.profile_photo.public_filename(size)
+ else
+ src = 'user_placeholder.png'
+ end
+ link_to(image_tag(src), user_path(user))
+ end
+
+end
2 app/helpers/front_door_helper.rb
@@ -0,0 +1,2 @@
+module FrontDoorHelper
+end
23 app/helpers/layout_helper.rb
@@ -0,0 +1,23 @@
+# These helper methods can be called in your template to set variables to be used in the layout
+# This module should be included in all views globally,
+# to do so you may need to add this line to your ApplicationController
+# helper :layout
+module LayoutHelper
+ def title(page_title, show_title = true)
+ @content_for_title = page_title.to_s
+ @show_title = show_title
+ end
+
+ def show_title?
+ @show_title
+ end
+
+ def stylesheet(*args)
+ content_for(:head) { stylesheet_link_tag(*args.map(&:to_s)) }
+ end
+
+ def javascript(*args)
+ args = args.map { |arg| arg == :defaults ? arg : arg.to_s }
+ content_for(:head) { javascript_include_tag(*args) }
+ end
+end
2 app/helpers/user_sessions_helper.rb
@@ -0,0 +1,2 @@
+module UserSessionsHelper
+end
2 app/helpers/users_helper.rb
@@ -0,0 +1,2 @@
+module UsersHelper
+end
3 app/models/user.rb
@@ -0,0 +1,3 @@
+class User < ActiveRecord::Base
+ acts_as_authentic
+end
2 app/models/user_session.rb
@@ -0,0 +1,2 @@
+class UserSession < Authlogic::Session::Base
+end
2 app/views/front_door/index.html.erb
@@ -0,0 +1,2 @@
+<h1>FrontDoor#index</h1>
+<p>Find me in app/views/front_door/index.html.erb</p>
32 app/views/layouts/application.html.erb
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <title><%= h(yield(:title) || "Untitled") %></title>
+ <%= stylesheet_link_tag 'application' %>
+ <%= yield(:head) %>
+ </head>
+ <body>
+ <div id="container">
+ <div id="user_nav">
+ <% if current_user %>
+ <%= link_to "Edit Profile", edit_user_path(:current) %> |
+ <%= link_to "Logout", logout_path %>
+ <% else %>
+
+ <%= link_to "Register", new_user_path %> |
+ <%= link_to "Login", login_path %>
+ <% end %>
+ </div>
+ <%- flash.each do |name, msg| -%>
+ <%= content_tag :div, msg, :id => "flash_#{name}" %>
+ <%- end -%>
+
+ <%- if show_title? -%>
+ <h1><%=h yield(:title) %></h1>
+ <%- end -%>
+
+ <%= yield %>
+ </div>
+ </body>
+</html>
17 app/views/layouts/usersOld.html.erb
@@ -0,0 +1,17 @@
+<!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" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+ <title>Users: <%= controller.action_name %></title>
+ <%= stylesheet_link_tag 'scaffold' %>
+</head>
+<body>
+
+<p style="color: green"><%= flash[:notice] %></p>
+
+<%= yield %>
+
+</body>
+</html>
127 app/views/shared/_ft_inner_html.html.erb
@@ -0,0 +1,127 @@
+ <div id="ft_body" class="yui-g">
+ <div class="yui-g first">
+ <div class="yui-u first">
+ <p class="footer_title"><a href="/stories">Stories</a></p>
+
+ <div class="footer_column_body">
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="/stories/11202">How to Remove Chicken Breasts</a></p>
+
+ <p class="description">Save money and buy your chicken whole</p>
+ </div>
+
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="/stories/11199">Audible Edibles</a></p>
+
+ <p class="description">Ten radio food shows that will leave you salivating</p>
+ </div>
+
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="/stories/11197">How to Set a Fried Egg</a></p>
+
+ <p class="description">Give it a quick steam</p>
+ </div>
+ </div>
+
+ <p class="more"><a href="/stories">More &gt;</a></p>
+ </div>
+
+ <div class="yui-u">
+ <p class="footer_title"><a href="/recipes">Recipes</a></p>
+
+ <div class="footer_column_body">
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="/recipes/10946">Grilled Lime Pound Cake with Raspberry Sorbet</a></p>
+
+ <p class="description">A delicious finish to an alfresco meal</p>
+ </div>
+
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="/recipes/11373">Slushy Blended Margarita</a></p>
+
+ <p class="description">The slushy cousin of the famous tequila cocktail</p>
+ </div>
+
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="/recipes/10628">Backyard Championship Ribs</a></p>
+
+ <p class="description">Getting big-barbecue results with a smaller cooker</p>
+ </div>
+ </div>
+
+ <p class="more"><a href="/recipes">More &gt;</a></p>
+ </div>
+ </div>
+
+ <div class="yui-g">
+ <div class="yui-u first">
+ <p class="footer_title"><a href="/blogs">Blogs</a></p>
+
+ <div class="footer_column_body">
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="/grinder/5903">Baconbaconbaconbacon ... It's BACON!</a></p>
+
+ <p class="description">Salon kicks off Pork Week with a thoughtful analysis of the...</p>
+ </div>
+
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="/grinder/5902">Expensive Escargot</a></p>
+
+ <p class="description">Rising prices hit the snail sector...</p>
+ </div>
+
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="/grinder/5901">Uplifting Watermelon</a></p>
+
+ <p class="description">Does eating melon make you horny...</p>
+ </div>
+ </div>
+
+ <p class="more"><a href="/blogs">More &gt;</a></p>
+ </div>
+
+ <div class="yui-u">
+ <p class="footer_title"><a href="http://www.chowhound.com/">Boards</a></p>
+
+ <div class="footer_column_body">
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="http://www.chowhound.com/topics/536427">Fancy Food Show experience NYC 2008</a></p>
+
+ <p class="description">I attended the Fancy Food Show about a week ago and...</p>
+ </div>
+
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="http://www.chowhound.com/topics/536426">GOOD EATS NEAR PASADENA PLAYHOUSE?</a></p>
+
+ <p class="description">I'm going to the Playhouse this Saturday night. What's cooking? ...</p>
+ </div>
+
+ <div class="gumball mb10">
+ <p class="footer_item_title"><a href="http://www.chowhound.com/topics/536425">Caterers in Denver</a></p>
+
+ <p class="description">Need a caterer for an event with the DNC Convention. Budget...</p>
+ </div>
+ </div>
+
+ <p class="more"><a href="http://www.chowhound.com/">More &gt;</a></p>
+ </div>
+ </div>
+
+ <div class="clear"></div>
+ </div>
+
+ <div id="ft_nav">
+ <p id="about_menu" class="mt10 mb10"><strong><a href="/about">About PALOOZA</a></strong> | <a href="http://sitemap.chow.com/">Site Map</a> | <a href="/newsletters">Newsletters</a> | <a href="http://m.chow.com/">Mobile</a> | <a href="/tags">Tags</a> | <a href="http://www.chowhound.com/boards/59">Feedback</a> | <a href="http://www.chowhound.com/boards/30">Site Talk</a> | <strong><a href="http://www.chowhound.com/topics/367605">Chowhound</a></strong> : <a href="http://www.chowhound.com/topics/367605">Guidelines</a> : <a href="http://www.chowhound.com/manifesto">Manifesto</a> : <a href="/faq">FAQ</a></p>
+
+ <div id="cbsi_f" class="mt10 mb10">
+ <div>
+
+ <p><a href="http://www.paloozahub.com/?tag=footer;link">About Palooza Hub Networks</a> | <a href="http://www.paloozahub.com/careers/?tag=footer;link">Jobs</a> | <a href="http://www.paloozahub.com/advertise/?tag=footer;link">Advertise</a></p>
+
+ <p>© 2008 Palooza Hub Networks. All rights reserved. | <a href="http://www.paloozahub.com/editorial/privacy.html?tag=ft">Privacy Policy</a> | <a href="http://www.paloozahub.com/editorial/terms.html?tag=ft">Terms of Use</a></p>
+ </div>
+
+ <div class="corner-bottom-left"></div>
+
+ <div class="corner-bottom-right"></div>
+ </div>
467 app/views/shared/_hd_inner_html.html.erb
@@ -0,0 +1,467 @@
+
+
+ <div class="madison_ad ad pos300 sp64 empty">
+ <!-- MAC ad --><!-- NO AD TEXT: _QUERY_STRING="GLOBAL&ADREQ&UA=Mozilla/5.0%20(Macintosh;%20U;%20PPC%20Mac%20OS%20X%2010.4;%20en-US;%20rv:1.9)%20Gecko/2008061004%20Firefox/3.0&REMOTE_ADDR=204.2.133.30&BRAND=26&SITE=103&NCAT=12711:&PTYPE=LP&SP=64&POS=300&BYPASSKEY=" _REQ_NUM="0" --><!-- default ad --><img src="/images/dotclear.gif" alt="" style="position: absolute; top: 0px; left: 0px;" height="0" width="0" /><!-- MAC [r20080616-1708-msm-1-13-10-LogArgmap:1.13.10] c17-ad-xw4.cnet.com::4065119152 2008.07.08.01.37.36 --><!-- MAC T 0.0.2.3 -->
+ </div>
+
+ <div class="p10">
+ <div class="corner-top-left"></div>
+
+ <div class="corner-top-right"></div>
+
+ <h5 class="logo" id="logo_chow"><a href="/">CHOW: Food. Drink. Fun.</a><img alt="" src="/images/logo-chow-oatmeal.gif" /></h5>
+
+ <p id="page_menu"><a href="#content">Skip To Content »</a></p>
+
+ <div id="user_menu">
+
+ <% if current_user %>
+ <p>
+
+ Hello <%= link_to h(current_user.username), user_path(current_user) %> | <%= link_to 'Sign Out', logout_path %> |
+ <%= link_to "Edit Profile", edit_user_path(:current) %>
+
+ <% else %>
+ <%= link_to "Login", login_path %> |
+ <%= link_to "Sign Up", new_user_path %>
+ <% end %>
+
+ | <%# This feature to be added in the future: <a href="/newsletters">Newsletters</a> %></p>
+
+ <p id="site_message"><%# <a href="/newsletters">Sign up for Palooza newsletters!</a> ## This to be added %></p>
+ </div>
+
+ <div id="searchbar"><%#
+ <form action="/search" id="search" method="get" name="search">
+ <input class="entry" id="searchbar_entry" name="search[query]" size="28" type="text" /><input alt="Search" class="button" name="Search" src="/images/button-search2.gif" style="padding: 0pt;" type="image" />
+ </form>## To be added %>
+ </div>
+
+ <div class="clear"></div>
+ </div>
+
+ <div id="nav_tier1">
+ <p id="theme_menu"><strong>theme</strong> <a href="/user/theme/oatmeal?return_to=%2Frecipes" rel="nofollow" title="header=[] body=[&lt;img src='/images/nav-theme-oatmeal-preview.gif' alt='' /&gt;] cssbody=[user_tooltip] offsetx=[-110]"><img alt="oatmeal" src="/images/nav-theme-oatmeal.gif" /></a> <a href="/user/theme/red?return_to=%2Frecipes" rel="nofollow" title="header=[] body=[&lt;img src='/images/nav-theme-red-preview.gif' alt='' /&gt;] cssbody=[user_tooltip] offsetx=[-110]"><img alt="red" src="/images/nav-theme-red.gif" /></a></p>
+
+ <ul id="main_menu">
+ <li id="main_menu_home"><a href="/" title="Home"><img alt="Home" id="main_menu_home_img" src="/images/nav1-home-red.gif" name="main_menu_home_img" /></a></li>
+
+ <li class="current" id="main_menu_recipes"><a href="/recipes" class="menu_link_text" title="Visit Recipes">Recipes</a> <a class="toggle_button" id="toggle_recipes" title="Browse Recipes" name="toggle_recipes"><img alt="" src="/images/clear.gif" height="17" width="17" /></a></li>
+
+ <li id="main_menu_boards"><a href="http://www.chowhound.com/" class="menu_link_text" title="Browse Chowhound Boards">Boards</a> <a class="toggle_button" id="toggle_boards" title="Browse Chowhound Boards" name="toggle_boards"><img alt="" src="/images/clear.gif" height="17" width="17" /></a></li>
+
+ <li id="main_menu_places"><a href="/places/regions" class="menu_link_text" title="Visit Places">Places</a> <a class="toggle_button" id="toggle_places" title="Browse Places" name="toggle_places"><img alt="" src="/images/clear.gif" height="17" width="17" /></a></li>
+
+ <li id="main_menu_stories"><a href="/stories" class="menu_link_text" title="Visit Stories">Stories</a> <a class="toggle_button" id="toggle_stories" title="Browse Stories" name="toggle_stories"><img alt="" src="/images/clear.gif" height="17" width="17" /></a></li>
+
+ <li id="main_menu_blogs"><a href="/blogs" class="menu_link_text" title="Visit the Blogs">Blogs</a> <a class="toggle_button" id="toggle_blogs" title="Browse Blog Posts" name="toggle_blogs"><img alt="" src="/images/clear.gif" height="17" width="17" /></a></li>
+
+ <li id="main_menu_videos"><a href="/videos" class="menu_link_text" title="View Videos">Videos</a></li>
+ <li id="main_menu_profile">
+ <% if !logged_in? %>
+ <a href="/login" class="menu_link_text" id="profile_link" title="Visit MyChow" name="profile_link">my Palooza</a>
+ <a class="toggle_button" id="toggle_profile" style="display: none;" title="Visit your My Palooza profile" name="toggle_profile">
+ <img alt="" src="/images/clear.gif" height="17" width="17" /></a>
+ <% else %>
+ <%= link_to "Palooza", user_path(current_user.login) %> <a class="toggle_button" id="toggle_profile" title="Visit your Palooza profile"><img alt="" height="17" src="/images/clear.gif" width="17" /></a>
+
+ <% end %>
+
+ </li>
+ </ul>
+
+ <div class="clear"></div>
+
+ <div id="menu_boards" class="nav_tier2" style="display: none;">
+ <a class="toggle_link" href="#" id="close_boards" onclick="MainNav.toggle('boards').onclick(); return false;" name="close_boards"><img alt="close" src="/images/button-close3-orange.gif" /></a>
+
+ <p><a href="http://www.chowhound.com/new_posts/show">My Unread Posts <small>(aka "Hot Posts")</small></a> &nbsp;&nbsp;&nbsp; <a href="http://www.chowhound.com/">Latest Posts</a></p>
+
+ <div class="clear"></div>
+
+ <div class="nav_tier3">
+ <table class="boards_grouped_index">
+ <tbody>
+ <tr>
+ <td>
+ <dl>
+ <dt>Pacific Northwest</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/4">Pacific Northwest</a></dd>
+ </dl>
+
+ <dl>
+ <dt>California</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/1">San Francisco Bay Area</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/2">Los Angeles Area</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/3">California</a></dd>
+ </dl>
+
+ <dl>
+ <dt>Southwest</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/5">Texas</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/6">Southwest</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/61">Austin</a></dd>
+ </dl>
+
+ <dl>
+ <dt>Midwest</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/7">Chicago Area</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/8">Midwest</a></dd>
+ </dl>
+
+ <dl>
+ <dt>South</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/9">New Orleans</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/10">Florida</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/11">South</a></dd>
+ </dl>
+ </td>
+
+ <td>
+ <dl>
+ <dt>Mid-Atlantic</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/14">Washington DC &amp; Baltimore Area</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/15">Pennsylvania</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/16">Mid-Atlantic</a></dd>
+ </dl>
+
+ <dl>
+ <dt>NYC Metro (and north)</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/17">What's My Craving?</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/18">Manhattan</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/19">Outer Boroughs</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/20">Tristate Region</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/21">The Best</a></dd>
+ </dl>
+
+ <dl>
+ <dt>New England</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/12">Boston Area</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/13">New England</a></dd>
+ </dl>
+ </td>
+
+ <td>
+ <dl>
+ <dt>Topical</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/27">General Chowhounding Topics</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/29">Not About Food</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/31">Home Cooking</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/33">Food Media and News</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/34">Wine</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/35">Beer</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/36">Spirits</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/41">Cookware</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/60">CHOW Tour</a></dd>
+ </dl>
+
+ <dl>
+ <dt>Site Specific</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/30">Site Talk</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/40">Technical Help</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/59">Palooza Feedback</a></dd>
+ </dl>
+
+ <dl>
+ <dt>National</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/25">Elsewhere In America</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/28">Kosher</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/32">Chains</a></dd>
+ </dl>
+ </td>
+
+ <td>
+ <dl>
+ <dt>International</dt>
+
+ <dd><a href="http://www.chowhound.com/boards/22">Quebec (including Montreal)</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/23">Ontario (including Toronto)</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/24">Canada</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/26">International</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/37">Australia/New Zealand</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/42">U.K./Ireland</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/44">South Asia</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/45">Japan</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/46">China</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/47">Russia</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/48">Greater Asia</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/49">France</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/50">Spain/Portugal</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/51">Africa</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/52">Turkey/Greece</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/53">Middle East and Africa</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/54">Caribbean</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/55">Mexico</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/56">South America</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/57">Western Canada</a></dd>
+
+ <dd><a href="http://www.chowhound.com/boards/58">Italy</a></dd>
+ </dl>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class="about_boards">
+ <p class="heading">About the boards</p>
+
+ <ul>
+ <li><a href="http://www.chowhound.com/topics/367605">Posting Etiquette</a></li>
+
+ <li><a href="http://www.chowhound.com/manifesto">Chowhound Manifesto</a></li>
+
+ <li><a href="/faq">FAQ</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+
+ <div id="menu_blogs" class="nav_tier2" style="display: none;">
+ <a class="toggle_link" href="#" id="close_blogs" onclick="MainNav.toggle('blogs').onclick(); return false;" name="close_blogs"><img alt="close" src="/images/button-close3-orange.gif" /></a>
+
+ <p class="heading">Browse by name</p>
+
+ <ul class="fl">
+ <li><a href="/grinder" title="Our Food Media Blog">The Grinder</a></li>
+
+ <li><a href="/pick" title="Paloozas We Like">Palooza Pick</a></li>
+ </ul>
+
+ <ul class="fl">
+ <li><a href="/digest" title="Chowhound's Daily Roundup">The Digest</a></li>
+
+ <li><a href="/tastingnotes" title="Our Wine Blog">Tasting Notes</a></li>
+ </ul>
+
+ <ul class="fl">
+ <li><a href="/mongol_rally" title="From London to Mongolia, fish and chips to fermented horse milk, all in a month. Writer Joshua M. Bernstein and his crew are eating their way across 8,000 miles in the Mongol Rally...">Palooza Tour: Mongol Rally</a></li>
+
+ <li><a href="/tour" title="Follow along with Chowhound cofounder Jim Leff as he crisscrosses North America on a monumental road trip in search of hyperdeliciousness. You never know where he might turn up...">Palooza Tour: North America</a></li>
+ </ul>
+
+ <div class="clear"></div>
+ </div>
+
+ <div id="menu_stories" class="nav_tier2" style="display: none;">
+ <a class="toggle_link" href="#" id="close_stories" onclick="MainNav.toggle('stories').onclick(); return false;" name="close_stories"><img alt="close" src="/images/button-close3-orange.gif" /></a>
+
+ <p class="heading">Browse by Category</p>
+
+ <ul class="fl">
+ <li><a href="/stories/14/category">Palooza Tip</a></li>
+
+ <li><a href="/stories/66/category">Drink</a></li>
+
+ <li><a href="/stories/7/category">Entertaining</a></li>
+
+ <li><a href="/stories/6/category">Feature</a></li>
+
+ <li><a href="/stories/65/category">Gear</a></li>
+ </ul>
+
+ <ul class="fl">
+ <li><a href="/stories/62/category">Nagging Question</a></li>
+
+ <li><a href="/stories/86/category">Obsessives</a></li>
+
+ <li><a href="/stories/81/category">Products</a></li>
+
+ <li><a href="/stories/64/category">Project</a></li>
+
+ <li><a href="/stories/77/category">Q&amp;A</a></li>
+ </ul>
+
+ <ul class="fl">
+ <li><a href="/stories/91/category">Recipe-Free Cooking</a></li>
+
+ <li><a href="/stories/76/category">Shelf Life</a></li>
+
+ <li><a href="/stories/88/category">Supertaster</a></li>
+
+ <li><a href="/stories/71/category">Table Manners</a></li>
+
+ <li><a href="/stories/74/category">The Juice</a></li>
+ </ul>
+
+ <ul class="fl">
+ <li><a href="/stories/90/category">The Perfect</a></li>
+
+ <li><a href="/stories/70/category">The Ten</a></li>
+
+ <li><a href="/stories/92/category">Top Chef</a></li>
+
+ <li><a href="/stories/87/category">Travel</a></li>
+
+ <li><a href="/stories/89/category">Wanted</a></li>
+ </ul>
+
+ <ul class="fl">
+ <li><a href="/stories/93/category">You're Doing It All Wrong</a></li>
+ </ul>
+
+ <div class="clear"></div>
+ </div>
+
+ <div id="menu_recipes" class="nav_tier2" style="display: none;">
+ <a class="toggle_link" href="#" id="close_recipes" onclick="MainNav.toggle('recipes').onclick(); return false;" name="close_recipes"><img alt="close" src="/images/button-close3-orange.gif" /></a>
+
+ <p class="heading">Browse by Course</p>
+
+ <ul class="fl">
+ <li><a href="/recipes/45/category">Breakfast/Brunch</a></li>
+
+ <li><a href="/recipes/67/category">Condiment/Sauce</a></li>
+
+ <li><a href="/recipes/41/category">Drink</a></li>
+ </ul>
+
+ <ul class="fl">
+ <li><a href="/recipes/50/category">Main</a></li>
+
+ <li><a href="/recipes/84/category">Pasta/Noodles</a></li>
+
+ <li><a href="/recipes/55/category">Project</a></li>
+ </ul>
+
+ <ul class="fl">
+ <li><a href="/recipes/51/category">Side Dish</a></li>
+
+ <li><a href="/recipes/52/category">Snack</a></li>
+
+ <li><a href="/recipes/49/category">Soup/Salad/Sandwich</a></li>
+ </ul>
+
+ <ul class="fl">
+ <li><a href="/recipes/53/category">Starter</a></li>
+
+ <li><a href="/recipes/54/category">Sweet/Dessert</a></li>
+ </ul>
+
+ <div class="subnav_menu_button">
+ <p class="heading">New!</p>
+
+ <ul>
+ <li style="height: 1%;"><a href="/recipes/new"><img alt="add new recipe" src="/images/nav_publish_recipe_up.jpg" /></a></li>
+
+ <li><a href="http://www.chowhound.com/recipes/types/user">Member Recipes &amp; Hacks</a></li>
+ </ul>
+ </div>
+
+ <div class="clear"></div>
+ </div>
+
+ <div id="menu_places" class="nav_tier2" style="display: none;">
+ <a class="toggle_link" href="#" id="close_places" onclick="MainNav.toggle('places').onclick(); return false;" name="close_places"><img alt="close" src="/images/button-close3-orange.gif" /></a>
+
+ <p class="heading">Browse by region</p>
+
+ <ul class="fl">
+ <li><a href="/places/regions/18">Manhattan</a></li>
+
+ <li><a href="/places/regions/19">Outer Boroughs</a></li>
+
+ <li><a href="/places/regions/12">Boston Area</a></li>
+ </ul>
+
+ <ul class="fl">
+ <li><a href="/places/regions/14">Washington DC &amp; Baltimore Area</a></li>
+
+ <li><a href="/places/regions/7">Chicago Area</a></li>
+
+ <li><a href="/places/regions/23">Ontario (including Toronto)</a></li>
+ </ul>
+
+ <ul class="fl">
+ <li><a href="/places/regions/1">San Francisco Bay Area</a></li>
+
+ <li><a href="/places/regions/2">Los Angeles Area</a></li>
+ </ul>
+
+ <div class="subnav_menu_button">
+ <ul>
+ <li><a href="/places/new"><img alt="Add a Place" src="/images/btn_addplace.gif" /></a></li>
+ </ul>
+ </div>
+
+ <div class="clear"></div>
+ </div>
+
+ <div id="menu_profile" class="nav_tier2" style="display: none;">
+ <a class="toggle_link" href="#" id="close_profile" onclick="MainNav.toggle('profile').onclick(); return false;" name="close_profile"><img alt="close" src="/images/button-close3-orange.gif" /></a>
+
+ <ul class="inline">
+ <% if @user %>
+ <li><%= link_to h(@user.real_name), user_path(@user) %></li>
+ <li id="profile_nav_favorites" style="display: inline;">
+ <%= link_to "Favorites", user_path(1) %>
+
+ <li id="profile_nav_settings" >
+ <%= link_to h(@user.login), user_path(@user.login) %>
+ </li>
+<%# This feature to be added in the future. <li id="profile_nav_newsletters"><a href="/newsletters">Newsletters</a></li>
+ %> <% else %>
+
+ <% end %>
+ <li>now is the time</li>
+
+ </ul>
+
+ <div class="clear"></div>
+ </div>
+ </div>
1 app/views/shared/_ie_stylsheets.html.erb
@@ -0,0 +1 @@
+ <!--[if IE]><link href="/stylesheets/chow_ie_common.css" media="screen" rel="Stylesheet" type="text/css" /><![endif]--><!--[if lte IE 6]><link href="/stylesheets/chow_ie6.css" media="screen" rel="Stylesheet" type="text/css" /><![endif]--><!--[if gte IE 7]><link href="/stylesheets/chow_ie7.css" media="screen" rel="Stylesheet" type="text/css" /><![endif]-->
3 app/views/shared/_mobile_message.html.erb
@@ -0,0 +1,3 @@
+ <div id="mobile_message">
+ <p>Browsing on your mobile phone? <a href="/mobile">Take a look at our mobile edition »</a></p>
+ </div>
1 app/views/shared/_rss_feeds.html.erb
@@ -0,0 +1 @@
+ <link href="http://feeds.feedburner.com/ChowRecipes" rel="alternate" title="CHOW RSS: http://feeds.feedburner.com/ChowRecipes" type="application/rss+xml" />
99 app/views/shared/_sidebar.html.erb
@@ -0,0 +1,99 @@
+ <div id="sidebar" class="yui-b">
+ <div class="madison_ad ad sp16 pos100" id="ad_box">
+ <!-- MAC ad -->
+
+ <div style="text-align:center">
+ <a href="http://www.cnetnetworks.com/adfeedback/?RGROUP=10605&amp;SEGMENTID=797246&amp;LINEID=253385&amp;SP=16&amp;ADVERTISERID=2443" target="new"><img src="http://i.i.com.com/cnwk.1d/Ads/common/ad_feedback_120x10_trans.gif" width="120" height="10" border="0" alt="advertisement" /></a><br />
+ </div><a href="http://adlog.com.com/adlog/c/r=10605&amp;s=797246&amp;o=12856:&amp;h=cn&amp;p=2&amp;b=26&amp;l=en_US&amp;site=103&amp;pt=SR&amp;nd=&amp;pid=&amp;cid=&amp;pp=100&amp;e=&amp;rqid=01c17-ad-e54897A5DE20C0563&amp;orh=&amp;oepartner=&amp;epartner=&amp;ppartner=&amp;pdom=&amp;cpnmodule=&amp;count=&amp;ra=204%2e2%2e133%2e30&amp;pg=&amp;t=2008.08.08.18.09.03/http://www.chow.com/stories/11082" target="_blank"><img src="http://adlog.com.com/adlog/i/r=10605&amp;s=797246&amp;o=12856:&amp;h=cn&amp;p=2&amp;b=26&amp;l=en_US&amp;site=103&amp;pt=SR&amp;nd=&amp;pid=&amp;cid=&amp;pp=100&amp;e=&amp;rqid=01c17-ad-e54897A5DE20C0563&amp;orh=&amp;ort=&amp;oepartner=&amp;epartner=&amp;ppartner=&amp;pdom=&amp;cpnmodule=&amp;count=&amp;ra=204%2e2%2e133%2e30&amp;dvar=&amp;ucat_rsi=&amp;pg=&amp;t=2008.08.08.18.09.03/http://i.i.com.com/cnwk.1d/Ads/2443/10/CHOW_Wii_Menu_300x250.jpg" height="250" width="300" alt="Click Here" border="0" /></a><!-- MAC [r20080616-1708-msm-1-13-10-LogArgmap:1.13.10] c17-ad-xw3.cnet.com::4067703728 2008.08.08.18.09.03 --><!-- MAC T 0.0.2.3 -->
+ </div>
+
+ <div class="module">
+ <p class="topic_header_underline">In the Chowhound Boards</p>
+
+ <div class="module_body">
+ <div class="gumball">
+ <h4><a href="http://chowhound.chow.com/topics/546494">Inexpensive Tiffin Tins online</a></h4>
+
+ <p class="post_info_nb"><a href="http://www.chow.com/profile/202029">synecdoche</a> in <a href="http://chowhound.chow.com/boards/41">Cookware</a></p>
+ </div>
+
+ <div class="clear"></div>
+ </div>
+ </div>
+
+ <div class="madison_ad ad sp162 pos100">
+ <!-- MAC ad -->
+
+ <div style="text-align:center">
+ <a href="http://www.cnetnetworks.com/adfeedback/?RGROUP=11424&amp;SEGMENTID=803059&amp;LINEID=258019&amp;SP=162&amp;ADVERTISERID=2443" target="new"><img src="http://i.i.com.com/cnwk.1d/Ads/common/ad_feedback_120x10_trans.gif" width="120" height="10" border="0" alt="advertisement" /></a><br />
+ </div><a href="http://adlog.com.com/adlog/c/r=11424&amp;s=803059&amp;o=12856:&amp;h=cn&amp;p=2&amp;b=26&amp;l=en_US&amp;site=103&amp;pt=SR&amp;nd=&amp;pid=&amp;cid=&amp;pp=100&amp;e=&amp;rqid=00c17-ad-e8488E168B67CD59A&amp;orh=&amp;oepartner=&amp;epartner=&amp;ppartner=&amp;pdom=&amp;cpnmodule=&amp;count=&amp;ra=204%2e2%2e133%2e30&amp;pg=&amp;t=2008.08.08.18.09.03/http://www.chow.com/community-crush" target="_blank"><img src="http://adlog.com.com/adlog/i/r=11424&amp;s=803059&amp;o=12856:&amp;h=cn&amp;p=2&amp;b=26&amp;l=en_US&amp;site=103&amp;pt=SR&amp;nd=&amp;pid=&amp;cid=&amp;pp=100&amp;e=&amp;rqid=00c17-ad-e8488E168B67CD59A&amp;orh=&amp;ort=&amp;oepartner=&amp;epartner=&amp;ppartner=&amp;pdom=&amp;cpnmodule=&amp;count=&amp;ra=204%2e2%2e133%2e30&amp;dvar=&amp;ucat_rsi=&amp;pg=&amp;t=2008.08.08.18.09.03/http://i.i.com.com/cnwk.1d/Ads/2443/10/CHOW_CommunityCrush_300x100.jpg" height="100" width="300" alt="Click Here" border="0" /></a><!-- MAC [r20080616-1708-msm-1-13-10-LogArgmap:1.13.10] c17-ad-xw6.cnet.com::4078230448 2008.08.08.18.09.03 --><!-- MAC T 0.0.8.9 -->
+ </div>
+
+ <div id="rotator" class="module">
+ <p class="topic_header_underline">In <a href="http://www.chow.com/blogs">Blog Posts</a></p>
+
+ <div class="module_body">
+ <div class="module">
+ <p class="blog_logo"><a href="http://www.chow.com/grinder"><img alt="The Grinder - Our Food Media Blog" src="http://www.chow.com/images/blogs/headers/grinder_sm_tag.20080807184423.gif" /></a></p>
+
+ <div class="post">
+ <p class="post_item_title"><a href="http://www.chow.com/grinder/6115" rel="bookmark">Making a List, Greening it Twice</a></p>
+
+ <p class="description"><span class="entry-summary"><i>Grist</i> magazine has a simple guide for an environmentally friendly shopping list.</span> <small class="more"><a href="http://www.chow.com/grinder/6115">More...</a></small></p>
+
+ <div class="post_info">
+ <p class="author vcard fn"><a href="http://www.chow.com/profile/39725"><img alt="" class="avatar tiny" src="/uploads/3/4/6/2643_happy_tiny.jpg" /></a> <strong><a href="http://www.chow.com/profile/39725">Miriam Wolf</a></strong><br />
+ <abbr class='published' title='2008-08-08T09:07:00-07:00'>today</abbr> at 9:07am | <a href="http://www.chow.com/grinder/6115#comments">Comments (0)</a></p>
+ </div>
+ </div>
+ </div>
+
+ <div class="module">
+ <p class="blog_logo"><a href="http://www.chow.com/pick"><img alt="CHOW Pick - Stuff We Like" src="http://www.chow.com/images/blogs/headers/pick_sm_tag.20080807184423.gif" /></a></p>
+
+ <div class="post">
+ <p class="post_item_title"><a href="http://www.chow.com/pick/6086" rel="bookmark">White Winter Winery's Black Harbor Dessert Mead</a></p>
+
+ <p class="description"><span class="entry-summary">It’s almost like a port.</span> <small class="more"><a href="http://www.chow.com/pick/6086">More...</a></small></p>
+
+ <div class="post_info">
+ <p class="author vcard fn"><a href="http://www.chow.com/profile/28438"><img alt="" class="avatar tiny" src="/uploads/6/9/8/3896_jrthumb_tiny.jpg" /></a> <strong><a href="http://www.chow.com/profile/28438">James Norton</a></strong><br />
+ <abbr class='published' title='2008-08-07T15:10:00-07:00'>yesterday</abbr> at 3:10pm | <a href="http://www.chow.com/pick/6086#comments">Comments (0)</a></p>
+ </div>
+ </div>
+ </div>
+
+ <div class="module">
+ <p class="blog_logo"><a href="http://www.chow.com/digest"><img alt="The Digest - Chowhound's Daily Roundup" src="http://www.chow.com/images/blogs/headers/digest_sm_tag.20080807184423.gif" /></a></p>
+
+ <div class="post">
+ <p class="post_item_title"><a href="http://www.chow.com/digest/6127" rel="bookmark">Fresh, Fast Okra</a></p>
+
+ <p class="description"><span class="entry-summary">Delicious cooking methods without the slime.</span> <small class="more"><a href="http://www.chow.com/digest/6127">More...</a></small></p>
+
+ <div class="post_info">
+ <p class="author vcard fn"><a href="http://www.chow.com/profile/10074"><img alt="" class="avatar tiny" src="/images/avatar-tiny.gif" /></a> <strong><a href="http://www.chow.com/profile/10074">Caitlin McGrath</a></strong><br />
+ <abbr class='published' title='2008-08-07T12:42:00-07:00'>yesterday</abbr> at 12:42pm | <a href="http://www.chow.com/digest/6127#comments">Comments (0)</a></p>
+ </div>
+ </div>
+ </div>
+
+ <div class="module">
+ <p class="blog_logo"><a href="http://www.chow.com/tastingnotes"><img alt="Tasting Notes - Our Wine Blog" src="http://www.chow.com/images/blogs/headers/tasting_notes_sm_tag.20080807184423.gif" /></a></p>
+
+ <div class="post">
+ <p class="post_item_title"><a href="http://www.chow.com/tastingnotes/5925" rel="bookmark">Surf, Wine, and Money</a></p>
+
+ <p class="description"><span class="entry-summary">My Hawaiian vacation fantasy.</span> <small class="more"><a href="http://www.chow.com/tastingnotes/5925">More...</a></small></p>
+
+ <div class="post_info">
+ <p class="author vcard fn"><a href="http://www.chow.com/profile/12049"><img alt="" class="avatar tiny" src="/images/avatar-tiny.gif" /></a> <strong><a href="http://www.chow.com/profile/12049">Daniel Duane</a></strong><br />
+ <abbr class='published' title='2008-07-09T15:45:00-07:00'>Wednesday, July 9, 2008</abbr> at 3:45pm | <a href="http://www.chow.com/tastingnotes/5925#comments">Comments (7)</a></p>
+ </div>
+ </div>
+ </div>
+
+ <div class="clear"></div>
+ </div>
+ </div>
+ </div>
5 app/views/shared/_stylesheets.html.erb
@@ -0,0 +1,5 @@
+ <%= stylesheet_link_tag "redbox", "oatmeal", "equalize", "finesse", "recipe_hub","application", :cache => true %>
+ <link href="/stylesheets/chow_mobile.css" media="handheld" rel="Stylesheet" type="text/css" />
+
+
+
0 app/views/user_sessions/index.html.erb
No changes.
16 app/views/user_sessions/new.html.erb
@@ -0,0 +1,16 @@
+<% title "Login" %>
+
+<% form_for @user_session do |f| %>
+ <%= f.error_messages %>
+ <p>
+ <%= f.label :username %><br />
+ <%= f.text_field :username %>
+ </p>
+ <p>
+ <%= f.label :password %><br />
+ <%= f.password_field :password %>
+ </p>
+ <p><%= f.submit "Submit" %></p>
+<% end %>
+
+
20 app/views/users/_form.html.erb
@@ -0,0 +1,20 @@
+<% form_for @user do |f| %>
+ <%= f.error_messages %>
+ <p>
+ <%= f.label :username %><br />
+ <%= f.text_field :username %>
+ </p>
+ <p>
+ <%= f.label :email %><br />
+ <%= f.text_field :email %>
+ </p>
+ <p>
+ <%= f.label :password %><br />
+ <%= f.password_field :password %>
+ </p>
+ <p>
+ <%= f.label :password_confirmation %><br />
+ <%= f.password_field :password_confirmation %>
+ </p>
+ <p><%= f.submit "Submit" %></p>
+<% end %>
4 app/views/users/edit.html.erb
@@ -0,0 +1,4 @@
+<% title "Edit User" %>
+
+<%= render :partial => 'form' %>
+
24 app/views/users/index.html.erb
@@ -0,0 +1,24 @@
+<h1>Listing users</h1>
+
+<table>
+ <tr>
+ <th>Username</th>
+ <th>Email</th>
+ <th>Password</th>
+ </tr>
+
+<% @users.each do |user| %>
+ <tr>
+ <td><%=h user.username %></td>
+ <td><%=h user.email %></td>
+ <td><%=h user.password %></td>
+ <td><%= link_to 'Show', user %></td>
+ <td><%= link_to 'Edit', edit_user_path(user) %></td>
+ <td><%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete %></td>
+ </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New user', new_user_path %>
4 app/views/users/new.html.erb
@@ -0,0 +1,4 @@
+<% @page_title = "New User" %>
+
+<%= render :partial => 'form' %>
+
18 app/views/users/show.html.erb
@@ -0,0 +1,18 @@
+<p>
+ <b>Username:</b>
+ <%=h @user.username %>
+</p>
+
+<p>
+ <b>Email:</b>
+ <%=h @user.email %>
+</p>
+
+<p>
+ <b>Password:</b>
+ <%=h @user.password %>
+</p>
+
+
+<%= link_to 'Edit', edit_user_path(@user) %> |
+<%= link_to 'Back', users_path %>
110 config/boot.rb
@@ -0,0 +1,110 @@
+# Don't change this file!
+# Configure your app in config/environment.rb and config/environments/*.rb
+
+RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
+
+module Rails
+ class << self
+ def boot!
+ unless booted?
+ preinitialize
+ pick_boot.run
+ end
+ end
+
+ def booted?
+ defined? Rails::Initializer
+ end
+
+ def pick_boot
+ (vendor_rails? ? VendorBoot : GemBoot).new
+ end
+
+ def vendor_rails?
+ File.exist?("#{RAILS_ROOT}/vendor/rails")
+ end
+
+ def preinitialize
+ load(preinitializer_path) if File.exist?(preinitializer_path)
+ end
+
+ def preinitializer_path
+ "#{RAILS_ROOT}/config/preinitializer.rb"
+ end
+ end
+
+ class Boot
+ def run
+ load_initializer
+ Rails::Initializer.run(:set_load_path)
+ end
+ end
+
+ class VendorBoot < Boot
+ def load_initializer
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
+ Rails::Initializer.run(:install_gem_spec_stubs)
+ Rails::GemDependency.add_frozen_gem_path
+ end
+ end
+
+ class GemBoot < Boot
+ def load_initializer
+ self.class.load_rubygems
+ load_rails_gem
+ require 'initializer'
+ end
+
+ def load_rails_gem
+ if version = self.class.gem_version
+ gem 'rails', version
+ else
+ gem 'rails'
+ end
+ rescue Gem::LoadError => load_error
+ $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
+ exit 1
+ end
+
+ class << self
+ def rubygems_version
+ Gem::RubyGemsVersion rescue nil
+ end
+
+ def gem_version
+ if defined? RAILS_GEM_VERSION
+ RAILS_GEM_VERSION
+ elsif ENV.include?('RAILS_GEM_VERSION')
+ ENV['RAILS_GEM_VERSION']
+ else
+ parse_gem_version(read_environment_rb)
+ end
+ end
+
+ def load_rubygems
+ require 'rubygems'
+ min_version = '1.3.1'
+ unless rubygems_version >= min_version
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
+ exit 1
+ end
+
+ rescue LoadError
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
+ exit 1
+ end
+
+ def parse_gem_version(text)
+ $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
+ end
+
+ private
+ def read_environment_rb
+ File.read("#{RAILS_ROOT}/config/environment.rb")
+ end
+ end
+ end
+end
+
+# All that for this:
+Rails.boot!
22 config/database.yml
@@ -0,0 +1,22 @@
+# SQLite version 3.x
+# gem install sqlite3-ruby (not necessary on OS X Leopard)
+development:
+ adapter: sqlite3
+ database: db/development.sqlite3
+ pool: 5
+ timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: sqlite3
+ database: db/test.sqlite3
+ pool: 5
+ timeout: 5000
+
+production:
+ adapter: sqlite3
+ database: db/production.sqlite3
+ pool: 5
+ timeout: 5000
44 config/environment.rb
@@ -0,0 +1,44 @@
+# Be sure to restart your server when you modify this file
+
+# Specifies gem version of Rails to use when vendor/rails is not present
+RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
+
+# Bootstrap the Rails environment, frameworks, and default configuration
+require File.join(File.dirname(__FILE__), 'boot')
+
+Rails::Initializer.run do |config|
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ # Add additional load paths for your own custom dirs
+ # config.load_paths += %W( #{RAILS_ROOT}/extras )
+
+ # Specify gems that this application depends on and have them installed with rake gems:install
+ # config.gem "bj"
+ # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
+ # config.gem "sqlite3-ruby", :lib => "sqlite3"
+ # config.gem "aws-s3", :lib => "aws/s3"
+ config.gem "restfulx"
+ config.gem "paperclip"
+ config.gem "authlogic"
+
+ # 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 ]
+
+ # Skip frameworks you're not going to use. To use Rails without a database,
+ # you must remove the Active Record framework.
+ # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
+
+ # Activate observers that should always be running
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+ # 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'
+
+ # 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
17 config/environments/development.rb
@@ -0,0 +1,17 @@
+# Settings specified here will take precedence over those in config/environment.rb
+
+# In the development environment your application's code is reloaded on
+# every request. This slows down response time but is perfect for development
+# since you don't have to restart the webserver when you make code changes.
+config.cache_classes = false
+
+# Log error messages when you accidentally call methods on nil.
+config.whiny_nils = true
+
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_view.debug_rjs = true
+config.action_controller.perform_caching = false
+
+# Don't care if the mailer can't send
+config.action_mailer.raise_delivery_errors = false
28 config/environments/production.rb
@@ -0,0 +1,28 @@
+# Settings specified here will take precedence over those in config/environment.rb
+
+# The production environment is meant for finished, "live" apps.
+# Code is not reloaded between requests
+config.cache_classes = true
+
+# Full error reports are disabled and caching is turned on
+config.action_controller.consider_all_requests_local = false
+config.action_controller.perform_caching = true
+config.action_view.cache_template_loading = true
+
+# See everything in the log (default is :info)
+# config.log_level = :debug
+
+# Use a different logger for distributed setups
+# config.logger = SyslogLogger.new
+
+# Use a different cache store in production
+# config.cache_store = :mem_cache_store
+
+# Enable serving of images, stylesheets, and javascripts from an asset server
+# config.action_controller.asset_host = "http://assets.example.com"
+
+# Disable delivery errors, bad email addresses will be ignored
+# config.action_mailer.raise_delivery_errors = false
+
+# Enable threaded mode
+# config.threadsafe!
28 config/environments/test.rb
@@ -0,0 +1,28 @@
+# Settings specified here will take precedence over those in config/environment.rb
+
+# The test environment is used exclusively to run your application's
+# test suite. You never need to work with it otherwise. Remember that
+# your test database is "scratch space" for the test suite and is wiped
+# and recreated between test runs. Don't rely on the data there!
+config.cache_classes = true
+
+# Log error messages when you accidentally call methods on nil.
+config.whiny_nils = true
+
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_controller.perform_caching = false
+config.action_view.cache_template_loading = true
+
+# Disable request forgery protection in test environment
+config.action_controller.allow_forgery_protection = false
+
+# Tell Action Mailer not to deliver emails to the real world.
+# The :test delivery method accumulates sent emails in the
+# ActionMailer::Base.deliveries array.
+config.action_mailer.delivery_method = :test
+
+# Use SQL instead of Active Record's schema dumper when creating the test database.
+# This is necessary if your schema can't be completely dumped by the schema dumper,
+# like if you have constraints or database-specific column types
+# config.active_record.schema_format = :sql
7 config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
10 config/initializers/inflections.rb
@@ -0,0 +1,10 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
5 config/initializers/mime_types.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
19 config/initializers/new_rails_defaults.rb
@@ -0,0 +1,19 @@
+# Be sure to restart your server when you modify this file.
+
+# These settings change the behavior of Rails 2 apps and will be defaults
+# for Rails 3. You can remove this initializer when Rails 3 is released.
+
+if defined?(ActiveRecord)
+ # Include Active Record class name as root for JSON serialized output.
+ ActiveRecord::Base.include_root_in_json = true
+
+ # Store the full class name (including module namespace) in STI type column.
+ ActiveRecord::Base.store_full_sti_class = true
+end
+
+# Use ISO 8601 format for JSON serialized times and dates.
+ActiveSupport.use_standard_json_time_format = true
+
+# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
+# if you're including raw json in an HTML page.
+ActiveSupport.escape_html_entities_in_json = false
15 config/initializers/session_store.rb
@@ -0,0 +1,15 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying cookie session data integrity.
+# If you change this key, all old sessions will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+ActionController::Base.session = {
+ :key => '_palooza_heroku_session',
+ :secret => '1771d259fcb4c0d068efd9bc754f4975e73ea356f4de344661abecd62941090936f57534a39ea72334ab646b48ffc726e6ab7f30b24d6b76b1f0a72bb72ef45e'
+}
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rake db:sessions:create")
+# ActionController::Base.session_store = :active_record_store
5 config/locales/en.yml
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+ hello: "Hello world"
54 config/routes.rb
@@ -0,0 +1,54 @@
+ActionController::Routing::Routes.draw do |map|
+ map.resources :user_sessions
+
+ map.resources :users
+
+ map.resources :user_sessions
+
+ ##Pretty Routes
+ map.login 'login', :controller => "user_sessions", :action => "new"
+ map.logout 'logout', :controller => "user_sessions", :action => "destroy"
+
+
+ # The priority is based upon order of creation: first created -> highest priority.
+
+ # Sample of regular route:
+ # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
+ # Keep in mind you can assign values other than :controller and :action
+
+ # Sample of named route:
+ # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
+ # This route can be invoked with purchase_url(:id => product.id)
+
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
+ # map.resources :products
+
+ # Sample resource route with options:
+ # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
+
+ # Sample resource route with sub-resources:
+ # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
+
+ # Sample resource route with more complex sub-resources
+ # map.resources :products do |products|
+ # products.resources :comments
+ # products.resources :sales, :collection => { :recent => :get }
+ # end
+
+ # Sample resource route within a namespace:
+ # map.namespace :admin do |admin|
+ # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
+ # admin.resources :products
+ # end
+
+ # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
+ map.root :controller => "front_door"
+
+ # See how all your routes lay out with "rake routes"
+
+ # Install the default routes as the lowest priority.
+ # Note: These default routes make all actions in every controller accessible via GET requests. You should
+ # consider removing the them or commenting them out if you're using named routes and resources.
+ map.connect ':controller/:action/:id'
+ map.connect ':controller/:action/:id.:format'
+end
BIN db/development.sqlite3
Binary file not shown.
16 db/migrate/20090707042709_create_users.rb
@@ -0,0 +1,16 @@
+class CreateUsers < ActiveRecord::Migration
+ def self.up
+ create_table :users do |t|
+ t.string :username
+ t.string :email
+ t.string :crypted_password
+ t.string :password_salt
+ t.string :persistence_token
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :users
+ end
+end
24 db/schema.rb
@@ -0,0 +1,24 @@
+# This file is auto-generated from the current state of the database. Instead of editing this file,
+# please use the migrations feature of Active Record to incrementally modify your database, and
+# then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your database schema. If you need
+# to create the application database on another system, you should be using db:schema:load, not running
+# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended to check this file into your version control system.
+
+ActiveRecord::Schema.define(:version => 20090707042709) do
+
+ create_table "users", :force => true do |t|
+ t.string "username"
+ t.string "email"
+ t.string "crypted_password"
+ t.string "password_salt"
+ t.string "persistence_token"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+end
2 doc/README_FOR_APP
@@ -0,0 +1,2 @@
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
1,514 log/development.log
@@ -0,0 +1,1514 @@
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (4.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
+ SQL (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM schema_migrations
+Migrating to CreateUsers (20090707000311)
+ SQL (0.7ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "username" varchar(255), "email" varchar(255), "crypted_password" varchar(255), "password_salt" varchar(255), "persistence_token" varchar(255), "created_at" datetime, "updated_at" datetime) 
+ SQL (0.2ms) INSERT INTO schema_migrations (version) VALUES ('20090707000311')
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM schema_migrations
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) PRAGMA index_list("users")
+
+
+Processing UsersController#index (for ::1 at 2009-07-06 18:19:14) [GET]
+ User Load (0.2ms) SELECT * FROM "users" 
+Rendering template within layouts/users
+Rendering users/index
+Completed in 76ms (View: 8, DB: 0) | 200 OK [http://localhost/users]
+
+
+Processing UsersController#index (for ::1 at 2009-07-06 18:28:21) [GET]
+ User Load (0.3ms) SELECT * FROM "users" 
+Rendering template within layouts/application
+Rendering users/index
+
+ActionView::TemplateError (undefined local variable or method `page_title' for #<ActionView::Base:0x271f848>) on line #7 of app/views/layouts/application.html.erb:
+4: <head profile="http://a9.com/-/spec/opensearch/1.1/">
+5: <meta name="generator" content="HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org" />
+6:
+7: <title><%= page_title %> </title>
+8: <meta name="verify-v1" content="mvraDxxNdXUusnoBQ+q8Ty0e0c3cak3C7Pck1s+aQBI=" />
+9: <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+10: <meta content="Recipes, cooking techniques, and news, updated daily. Devoted to the pleasure of food and drink." name="description" />
+
+ app/views/layouts/application.html.erb:7
+ restfulx (1.2.2) lib/restfulx.rb:69:in `render'
+ app/controllers/users_controller.rb:7:in `index'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
+
+Rendered rescues/_trace (49.2ms)
+Rendered rescues/_request_and_response (1.5ms)
+Rendering rescues/layout (internal_server_error)
+
+
+Processing UsersController#index (for ::1 at 2009-07-06 18:30:01) [GET]
+ User Load (0.3ms) SELECT * FROM "users" 
+Rendering template within layouts/application
+Rendering users/index
+
+ActionView::TemplateError (undefined local variable or method `page_title' for #<ActionView::Base:0x252f614>) on line #7 of app/views/layouts/application.html.erb:
+4: <head profile="http://a9.com/-/spec/opensearch/1.1/">
+5: <meta name="generator" content="HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org" />
+6:
+7: <title><%= page_title || "The Place to Buy Stuff" %> </title>
+8: <meta name="verify-v1" content="mvraDxxNdXUusnoBQ+q8Ty0e0c3cak3C7Pck1s+aQBI=" />
+9: <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+10: <meta content="Recipes, cooking techniques, and news, updated daily. Devoted to the pleasure of food and drink." name="description" />
+
+ app/views/layouts/application.html.erb:7
+ restfulx (1.2.2) lib/restfulx.rb:69:in `render'
+ app/controllers/users_controller.rb:7:in `index'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
+
+Rendered rescues/_trace (115.4ms)
+Rendered rescues/_request_and_response (0.3ms)
+Rendering rescues/layout (internal_server_error)
+
+
+Processing UsersController#index (for ::1 at 2009-07-06 18:31:45) [GET]
+ User Load (0.5ms) SELECT * FROM "users" 
+Rendering template within layouts/application
+Rendering users/index
+
+ActionView::TemplateError (undefined local variable or method `page_title' for #<ActionView::Base:0x2680194>) on line #7 of app/views/layouts/application.html.erb:
+4: <head profile="http://a9.com/-/spec/opensearch/1.1/">
+5: <meta name="generator" content="HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org" />
+6:
+7: <title><%= page_title || "paloozahub" %> </title>
+8: <meta name="verify-v1" content="mvraDxxNdXUusnoBQ+q8Ty0e0c3cak3C7Pck1s+aQBI=" />
+9: <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+10: <meta content="Recipes, cooking techniques, and news, updated daily. Devoted to the pleasure of food and drink." name="description" />
+
+ app/views/layouts/application.html.erb:7
+ restfulx (1.2.2) lib/restfulx.rb:69:in `render'
+ app/controllers/users_controller.rb:7:in `index'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
+
+Rendered rescues/_trace (45.5ms)
+Rendered rescues/_request_and_response (0.3ms)
+Rendering rescues/layout (internal_server_error)
+
+
+Processing UsersController#index (for ::1 at 2009-07-06 18:32:22) [GET]
+ User Load (0.2ms) SELECT * FROM "users" 
+Rendering template within layouts/application
+Rendering users/index
+Rendered shared/_stylesheets (1.1ms)
+Rendered shared/_ie_stylsheets (0.6ms)
+Rendered shared/_rss_feeds (0.5ms)
+
+ActionView::TemplateError (undefined local variable or method `page_classes' for #<ActionView::Base:0x24bd118>) on line #21 of app/views/layouts/application.html.erb:
+18: <%= render :partial => '/shared/rss_feeds' %>
+19: </head>
+20:
+21: <body <%= page_classes %> >
+22: <%= render :partial => '/shared/mobile_message' %>
+23:
+24: <div <%= page_template %> >
+
+ app/views/layouts/application.html.erb:21
+ restfulx (1.2.2) lib/restfulx.rb:69:in `render'
+ app/controllers/users_controller.rb:7:in `index'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
+
+Rendered rescues/_trace (44.6ms)
+Rendered rescues/_request_and_response (0.3ms)
+Rendering rescues/layout (internal_server_error)
+
+
+Processing UsersController#index (for ::1 at 2009-07-06 18:34:23) [GET]
+ User Load (0.2ms) SELECT * FROM "users" 
+Rendering template within layouts/application
+Rendering users/index
+Rendered shared/_stylesheets (0.5ms)
+Rendered shared/_ie_stylsheets (0.1ms)
+Rendered shared/_rss_feeds (0.1ms)
+Rendered shared/_mobile_message (0.5ms)
+
+ActionView::TemplateError (undefined method `logged_in?' for #<ActionView::Base:0x25ce6ec>) on line #19 of app/views/shared/_hd_inner_html.html.erb:
+16: }
+17: return true;
+18: }
+19: function do_rbx_itrk_netxp1 (parentId, iTrkId, iTrkUri) {
+20: if (!document.images) {
+21: return false;
+22: }
+
+ app/views/shared/_hd_inner_html.html.erb:19
+ app/views/layouts/application.html.erb:26
+ restfulx (1.2.2) lib/restfulx.rb:69:in `render'
+ app/controllers/users_controller.rb:7:in `index'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
+
+Rendered rescues/_trace (123.9ms)
+Rendered rescues/_request_and_response (0.3ms)
+Rendering rescues/layout (internal_server_error)
+
+
+Processing UsersController#index (for ::1 at 2009-07-06 18:38:20) [GET]
+ User Load (0.5ms) SELECT * FROM "users" 
+Rendering template within layouts/application
+Rendering users/index
+Rendered shared/_stylesheets (0.5ms)
+Rendered shared/_ie_stylsheets (0.1ms)
+Rendered shared/_rss_feeds (0.1ms)
+Rendered shared/_mobile_message (0.1ms)
+
+ActionView::TemplateError (undefined method `logged_in?' for #<ActionView::Base:0x265fac0>) on line #19 of app/views/shared/_hd_inner_html.html.erb:
+16: }
+17: return true;
+18: }
+19: function do_rbx_itrk_netxp1 (parentId, iTrkId, iTrkUri) {
+20: if (!document.images) {
+21: return false;
+22: }
+
+ app/views/shared/_hd_inner_html.html.erb:19
+ app/views/layouts/application.html.erb:26
+ restfulx (1.2.2) lib/restfulx.rb:69:in `render'
+ app/controllers/users_controller.rb:7:in `index'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
+
+Rendered rescues/_trace (58.6ms)
+Rendered rescues/_request_and_response (69.7ms)
+Rendering rescues/layout (internal_server_error)
+
+
+Processing UsersController#index (for ::1 at 2009-07-06 21:05:55) [GET]
+ User Load (0.2ms) SELECT * FROM "users" 
+Rendering template within layouts/application
+Rendering users/index
+Rendered shared/_stylesheets (1.3ms)
+Rendered shared/_ie_stylsheets (0.6ms)
+Rendered shared/_rss_feeds (0.4ms)
+Rendered shared/_mobile_message (0.6ms)
+
+ActionView::TemplateError (undefined method `logged_in?' for #<ActionView::Base:0x23ac800>) on line #19 of app/views/shared/_hd_inner_html.html.erb:
+16: }
+17: return true;
+18: }
+19: function do_rbx_itrk_netxp1 (parentId, iTrkId, iTrkUri) {
+20: if (!document.images) {
+21: return false;
+22: }
+
+ app/views/shared/_hd_inner_html.html.erb:19
+ app/views/layouts/application.html.erb:26
+ restfulx (1.2.2) lib/restfulx.rb:69:in `render'
+ app/controllers/users_controller.rb:7:in `index'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
+ /opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
+ /opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
+
+Rendered rescues/_trace (58.5ms)
+Rendered rescues/_request_and_response (1.5ms)
+Rendering rescues/layout (internal_server_error)
+
+
+Processing UsersController#new (for ::1 at 2009-07-06 21:26:26) [GET]
+Rendering template within layouts/application
+Rendering users/new
+Rendered users/_form (5.5ms)
+Rendered shared/_stylesheets (1.2ms)
+Rendered shared/_ie_stylsheets (0.6ms)
+Rendered shared/_rss_feeds (0.6ms)
+Rendered shared/_mobile_message (0.4ms)