Skip to content
This repository
Browse code

adding episodes 346 and 347

  • Loading branch information...
commit 4c1f6fbd60cbcaecc86ec24b8f7bececc4595e86 1 parent a1c1b8d
Ryan Bates authored May 03, 2012

Showing 310 changed files with 9,314 additions and 0 deletions. Show diff stats Hide diff stats

  1. 0  assets/.gitkeep b/episode-346/signup-after/lib/assets/.gitkeep
  2. 0  assets/.gitkeep b/episode-346/signup-before/lib/assets/.gitkeep
  3. 0  assets/.gitkeep b/episode-347/blog-after/lib/assets/.gitkeep
  4. 11  episode-346/README.md
  5. 15  episode-346/signup-after/.gitignore
  6. 40  episode-346/signup-after/Gemfile
  7. 117  episode-346/signup-after/Gemfile.lock
  8. 9  episode-346/signup-after/README.rdoc
  9. 7  episode-346/signup-after/Rakefile
  10. BIN  episode-346/signup-after/app/assets/images/rails.png
  11. 15  episode-346/signup-after/app/assets/javascripts/application.js
  12. 3  episode-346/signup-after/app/assets/javascripts/user_steps.js.coffee
  13. 3  episode-346/signup-after/app/assets/javascripts/users.js.coffee
  14. 98  episode-346/signup-after/app/assets/stylesheets/application.css
  15. 3  episode-346/signup-after/app/assets/stylesheets/user_steps.css.scss
  16. 3  episode-346/signup-after/app/assets/stylesheets/users.css.scss
  17. 10  episode-346/signup-after/app/controllers/application_controller.rb
  18. 21  episode-346/signup-after/app/controllers/user_steps_controller.rb
  19. 18  episode-346/signup-after/app/controllers/users_controller.rb
  20. 2  episode-346/signup-after/app/helpers/application_helper.rb
  21. 2  episode-346/signup-after/app/helpers/user_steps_helper.rb
  22. 2  episode-346/signup-after/app/helpers/users_helper.rb
  23. 0  episode-346/signup-after/app/mailers/.gitkeep
  24. 0  episode-346/signup-after/app/models/.gitkeep
  25. 7  episode-346/signup-after/app/models/user.rb
  26. 17  episode-346/signup-after/app/views/layouts/application.html.erb
  27. 18  episode-346/signup-after/app/views/user_steps/_form.html.erb
  28. 16  episode-346/signup-after/app/views/user_steps/personal.html.erb
  29. 16  episode-346/signup-after/app/views/user_steps/social.html.erb
  30. 11  episode-346/signup-after/app/views/users/index.html.erb
  31. 31  episode-346/signup-after/app/views/users/new.html.erb
  32. 4  episode-346/signup-after/config.ru
  33. 59  episode-346/signup-after/config/application.rb
  34. 6  episode-346/signup-after/config/boot.rb
  35. 25  episode-346/signup-after/config/database.yml
  36. 5  episode-346/signup-after/config/environment.rb
  37. 37  episode-346/signup-after/config/environments/development.rb
  38. 67  episode-346/signup-after/config/environments/production.rb
  39. 37  episode-346/signup-after/config/environments/test.rb
  40. 7  episode-346/signup-after/config/initializers/backtrace_silencers.rb
  41. 15  episode-346/signup-after/config/initializers/inflections.rb
  42. 5  episode-346/signup-after/config/initializers/mime_types.rb
  43. 7  episode-346/signup-after/config/initializers/secret_token.rb
  44. 8  episode-346/signup-after/config/initializers/session_store.rb
  45. 14  episode-346/signup-after/config/initializers/wrap_parameters.rb
  46. 5  episode-346/signup-after/config/locales/en.yml
  47. 5  episode-346/signup-after/config/routes.rb
  48. 16  episode-346/signup-after/db/migrate/20120430195743_create_users.rb
  49. 29  episode-346/signup-after/db/schema.rb
  50. 7  episode-346/signup-after/db/seeds.rb
  51. 2  episode-346/signup-after/doc/README_FOR_APP
  52. 0  episode-346/signup-after/log/.gitkeep
  53. 26  episode-346/signup-after/public/404.html
  54. 26  episode-346/signup-after/public/422.html
  55. 25  episode-346/signup-after/public/500.html
  56. 0  episode-346/signup-after/public/favicon.ico
  57. 5  episode-346/signup-after/public/robots.txt
  58. 6  episode-346/signup-after/script/rails
  59. 0  episode-346/signup-after/test/fixtures/.gitkeep
  60. 21  episode-346/signup-after/test/fixtures/users.yml
  61. 0  episode-346/signup-after/test/functional/.gitkeep
  62. 7  episode-346/signup-after/test/functional/user_steps_controller_test.rb
  63. 49  episode-346/signup-after/test/functional/users_controller_test.rb
  64. 0  episode-346/signup-after/test/integration/.gitkeep
  65. 12  episode-346/signup-after/test/performance/browsing_test.rb
  66. 13  episode-346/signup-after/test/test_helper.rb
  67. 0  episode-346/signup-after/test/unit/.gitkeep
  68. 4  episode-346/signup-after/test/unit/helpers/user_steps_helper_test.rb
  69. 4  episode-346/signup-after/test/unit/helpers/users_helper_test.rb
  70. 7  episode-346/signup-after/test/unit/user_test.rb
  71. 0  episode-346/signup-after/vendor/assets/javascripts/.gitkeep
  72. 0  episode-346/signup-after/vendor/assets/stylesheets/.gitkeep
  73. 0  episode-346/signup-after/vendor/plugins/.gitkeep
  74. 15  episode-346/signup-before/.gitignore
  75. 38  episode-346/signup-before/Gemfile
  76. 113  episode-346/signup-before/Gemfile.lock
  77. 9  episode-346/signup-before/README.rdoc
  78. 7  episode-346/signup-before/Rakefile
  79. BIN  episode-346/signup-before/app/assets/images/rails.png
  80. 15  episode-346/signup-before/app/assets/javascripts/application.js
  81. 3  episode-346/signup-before/app/assets/javascripts/users.js.coffee
  82. 93  episode-346/signup-before/app/assets/stylesheets/application.css
  83. 3  episode-346/signup-before/app/assets/stylesheets/users.css.scss
  84. 10  episode-346/signup-before/app/controllers/application_controller.rb
  85. 18  episode-346/signup-before/app/controllers/users_controller.rb
  86. 2  episode-346/signup-before/app/helpers/application_helper.rb
  87. 2  episode-346/signup-before/app/helpers/users_helper.rb
  88. 0  episode-346/signup-before/app/mailers/.gitkeep
  89. 0  episode-346/signup-before/app/models/.gitkeep
  90. 4  episode-346/signup-before/app/models/user.rb
  91. 17  episode-346/signup-before/app/views/layouts/application.html.erb
  92. 11  episode-346/signup-before/app/views/users/index.html.erb
  93. 58  episode-346/signup-before/app/views/users/new.html.erb
  94. 4  episode-346/signup-before/config.ru
  95. 59  episode-346/signup-before/config/application.rb
  96. 6  episode-346/signup-before/config/boot.rb
  97. 25  episode-346/signup-before/config/database.yml
  98. 5  episode-346/signup-before/config/environment.rb
  99. 37  episode-346/signup-before/config/environments/development.rb
  100. 67  episode-346/signup-before/config/environments/production.rb
  101. 37  episode-346/signup-before/config/environments/test.rb
  102. 7  episode-346/signup-before/config/initializers/backtrace_silencers.rb
  103. 15  episode-346/signup-before/config/initializers/inflections.rb
  104. 5  episode-346/signup-before/config/initializers/mime_types.rb
  105. 7  episode-346/signup-before/config/initializers/secret_token.rb
  106. 8  episode-346/signup-before/config/initializers/session_store.rb
  107. 14  episode-346/signup-before/config/initializers/wrap_parameters.rb
  108. 5  episode-346/signup-before/config/locales/en.yml
  109. 4  episode-346/signup-before/config/routes.rb
  110. 16  episode-346/signup-before/db/migrate/20120430195743_create_users.rb
  111. 29  episode-346/signup-before/db/schema.rb
  112. 7  episode-346/signup-before/db/seeds.rb
  113. 2  episode-346/signup-before/doc/README_FOR_APP
  114. 0  episode-346/signup-before/log/.gitkeep
  115. 26  episode-346/signup-before/public/404.html
  116. 26  episode-346/signup-before/public/422.html
  117. 25  episode-346/signup-before/public/500.html
  118. 0  episode-346/signup-before/public/favicon.ico
  119. 5  episode-346/signup-before/public/robots.txt
  120. 6  episode-346/signup-before/script/rails
  121. 0  episode-346/signup-before/test/fixtures/.gitkeep
  122. 21  episode-346/signup-before/test/fixtures/users.yml
  123. 0  episode-346/signup-before/test/functional/.gitkeep
  124. 49  episode-346/signup-before/test/functional/users_controller_test.rb
  125. 0  episode-346/signup-before/test/integration/.gitkeep
  126. 12  episode-346/signup-before/test/performance/browsing_test.rb
  127. 13  episode-346/signup-before/test/test_helper.rb
  128. 0  episode-346/signup-before/test/unit/.gitkeep
  129. 4  episode-346/signup-before/test/unit/helpers/users_helper_test.rb
  130. 7  episode-346/signup-before/test/unit/user_test.rb
  131. 0  episode-346/signup-before/vendor/assets/javascripts/.gitkeep
  132. 0  episode-346/signup-before/vendor/assets/stylesheets/.gitkeep
  133. 0  episode-346/signup-before/vendor/plugins/.gitkeep
  134. 40  episode-347/README.md
  135. 15  episode-347/blog-after/.gitignore
  136. 20  episode-347/blog-after/Capfile
  137. 43  episode-347/blog-after/Gemfile
  138. 185  episode-347/blog-after/Gemfile.lock
  139. 8  episode-347/blog-after/README.rdoc
  140. 7  episode-347/blog-after/Rakefile
  141. BIN  episode-347/blog-after/app/assets/images/rails.png
  142. 15  episode-347/blog-after/app/assets/javascripts/application.js
  143. 3  episode-347/blog-after/app/assets/javascripts/articles.js.coffee
  144. 13  episode-347/blog-after/app/assets/stylesheets/application.css
  145. 3  episode-347/blog-after/app/assets/stylesheets/articles.css.scss
  146. 56  episode-347/blog-after/app/assets/stylesheets/scaffolds.css.scss
  147. 3  episode-347/blog-after/app/controllers/application_controller.rb
  148. 83  episode-347/blog-after/app/controllers/articles_controller.rb
  149. 2  episode-347/blog-after/app/helpers/application_helper.rb
  150. 2  episode-347/blog-after/app/helpers/articles_helper.rb
  151. 0  episode-347/blog-after/app/mailers/.gitkeep
  152. 0  episode-347/blog-after/app/models/.gitkeep
  153. 3  episode-347/blog-after/app/models/article.rb
  154. 25  episode-347/blog-after/app/views/articles/_form.html.erb
  155. 6  episode-347/blog-after/app/views/articles/edit.html.erb
  156. 25  episode-347/blog-after/app/views/articles/index.html.erb
  157. 5  episode-347/blog-after/app/views/articles/new.html.erb
  158. 15  episode-347/blog-after/app/views/articles/show.html.erb
  159. 14  episode-347/blog-after/app/views/layouts/application.html.erb
  160. 4  episode-347/blog-after/config.ru
  161. 59  episode-347/blog-after/config/application.rb
  162. 6  episode-347/blog-after/config/boot.rb
  163. 55  episode-347/blog-after/config/database.yml
  164. 101  episode-347/blog-after/config/deploy.rb
  165. 5  episode-347/blog-after/config/environment.rb
  166. 37  episode-347/blog-after/config/environments/development.rb
  167. 67  episode-347/blog-after/config/environments/production.rb
  168. 37  episode-347/blog-after/config/environments/test.rb
  169. 7  episode-347/blog-after/config/initializers/backtrace_silencers.rb
  170. 53  episode-347/blog-after/config/initializers/graylog.rb
  171. 15  episode-347/blog-after/config/initializers/inflections.rb
  172. 5  episode-347/blog-after/config/initializers/mime_types.rb
  173. 7  episode-347/blog-after/config/initializers/secret_token.rb
  174. 8  episode-347/blog-after/config/initializers/session_store.rb
  175. 14  episode-347/blog-after/config/initializers/wrap_parameters.rb
  176. 5  episode-347/blog-after/config/locales/en.yml
  177. 60  episode-347/blog-after/config/routes.rb
  178. 21  episode-347/blog-after/config/rubber/common/crontab
  179. 12  episode-347/blog-after/config/rubber/common/database.yml
  180. 32  episode-347/blog-after/config/rubber/common/graylog-rsyslog.conf
  181. 71  episode-347/blog-after/config/rubber/common/rsyslog.conf
  182. 13  episode-347/blog-after/config/rubber/common/rubber.profile
  183. 59  episode-347/blog-after/config/rubber/deploy-apache.rb
  184. 48  episode-347/blog-after/config/rubber/deploy-collectd.rb
  185. 47  episode-347/blog-after/config/rubber/deploy-elasticsearch.rb
  186. 255  episode-347/blog-after/config/rubber/deploy-graphite.rb
  187. 118  episode-347/blog-after/config/rubber/deploy-graylog.rb
  188. 45  episode-347/blog-after/config/rubber/deploy-haproxy.rb
  189. 56  episode-347/blog-after/config/rubber/deploy-mongodb.rb
  190. 33  episode-347/blog-after/config/rubber/deploy-monit.rb
  191. 45  episode-347/blog-after/config/rubber/deploy-passenger.rb
  192. 140  episode-347/blog-after/config/rubber/deploy-postgresql.rb
  193. 107  episode-347/blog-after/config/rubber/deploy-setup.rb
  194. 91  episode-347/blog-after/config/rubber/deploy-util.rb
  195. 3  episode-347/blog-after/config/rubber/instance-production.yml
  196. 10  episode-347/blog-after/config/rubber/role/apache/deflate.conf
  197. 9  episode-347/blog-after/config/rubber/role/apache/expires.conf
  198. 6  episode-347/blog-after/config/rubber/role/apache/headers.conf
  199. 7  episode-347/blog-after/config/rubber/role/apache/monit-apache.conf
  200. 8  episode-347/blog-after/config/rubber/role/apache/ports.conf
  201. 52  episode-347/blog-after/config/rubber/role/apache/setenvif.conf
  202. 21  episode-347/blog-after/config/rubber/role/collectd/collectd-ping.conf
  203. 69  episode-347/blog-after/config/rubber/role/collectd/collectd.conf
  204. 35  episode-347/blog-after/config/rubber/role/collectd/filters.conf
  205. 21  episode-347/blog-after/config/rubber/role/collectd/graphite-collectd.conf
  206. 88  episode-347/blog-after/config/rubber/role/collectd/thresholds.conf
  207. 5  episode-347/blog-after/config/rubber/role/collectd/types.db
  208. 23  episode-347/blog-after/config/rubber/role/elasticsearch/elasticsearch-upstart.conf
  209. 348  episode-347/blog-after/config/rubber/role/elasticsearch/elasticsearch.yml
  210. 48  episode-347/blog-after/config/rubber/role/elasticsearch/logging.yml
  211. 8  episode-347/blog-after/config/rubber/role/elasticsearch/monit-elasticsearch.conf
  212. 232  episode-347/blog-after/config/rubber/role/graphite_server/carbon.conf
  213. 16  episode-347/blog-after/config/rubber/role/graphite_server/graphite_server-upstart.conf
  214. 8  episode-347/blog-after/config/rubber/role/graphite_server/monit-graphite_server.conf
  215. 19  episode-347/blog-after/config/rubber/role/graphite_server/storage-schemas.conf
  216. 8  episode-347/blog-after/config/rubber/role/graphite_web/crontab
  217. 60  episode-347/blog-after/config/rubber/role/graphite_web/dashboard.conf
  218. 385  episode-347/blog-after/config/rubber/role/graphite_web/dashboard.html
  219. 62  episode-347/blog-after/config/rubber/role/graphite_web/graphite-vhost.conf
  220. 10  episode-347/blog-after/config/rubber/role/graphite_web/graphite.wsgi
  221. 98  episode-347/blog-after/config/rubber/role/graphite_web/local_settings.py
  222. 67  episode-347/blog-after/config/rubber/role/graylog_server/graylog2.conf
  223. 22  episode-347/blog-after/config/rubber/role/graylog_server/graylog_server-upstart.conf
  224. 8  episode-347/blog-after/config/rubber/role/graylog_server/monit-graylog_server.conf
  225. 9  episode-347/blog-after/config/rubber/role/graylog_web/crontab
  226. 16  episode-347/blog-after/config/rubber/role/graylog_web/email.yml
  227. 27  episode-347/blog-after/config/rubber/role/graylog_web/general.yml
  228. 21  episode-347/blog-after/config/rubber/role/graylog_web/graylog_web-upstart.conf
  229. 28  episode-347/blog-after/config/rubber/role/graylog_web/mongoid.yml
  230. 8  episode-347/blog-after/config/rubber/role/graylog_web/monit-graylog_web.conf
  231. 26  episode-347/blog-after/config/rubber/role/haproxy/haproxy-base.conf
  232. 8  episode-347/blog-after/config/rubber/role/haproxy/haproxy-default.conf
  233. 21  episode-347/blog-after/config/rubber/role/haproxy/haproxy-passenger.conf
  234. 8  episode-347/blog-after/config/rubber/role/haproxy/monit-haproxy.conf
  235. 11  episode-347/blog-after/config/rubber/role/haproxy/syslog-haproxy.conf
  236. 21  episode-347/blog-after/config/rubber/role/haproxy/syslogd-default.conf
  237. 5  episode-347/blog-after/config/rubber/role/mongodb/mongodb-defaults.conf
  238. 92  episode-347/blog-after/config/rubber/role/mongodb/mongodb.conf
  239. 10  episode-347/blog-after/config/rubber/role/mongodb/monit-mongodb.conf
  240. 18  episode-347/blog-after/config/rubber/role/monit/monit-default.conf
  241. 8  episode-347/blog-after/config/rubber/role/monit/monit-postfix.conf
  242. 252  episode-347/blog-after/config/rubber/role/monit/monit.conf
  243. 7  episode-347/blog-after/config/rubber/role/passenger/collectd-passenger.conf
  244. 77  episode-347/blog-after/config/rubber/role/passenger/collectd-passenger.rb.conf
  245. 90  episode-347/blog-after/config/rubber/role/passenger/passenger-apache-vhost.conf
  246. 8  episode-347/blog-after/config/rubber/role/passenger/passenger-status-sudoers.conf
  247. 45  episode-347/blog-after/config/rubber/role/passenger/passenger.conf
  248. 22  episode-347/blog-after/config/rubber/role/postgresql/collectd-postgresql.conf
  249. 16  episode-347/blog-after/config/rubber/role/postgresql/crontab
  250. 10  episode-347/blog-after/config/rubber/role/postgresql/monit-postgresql.conf
  251. 98  episode-347/blog-after/config/rubber/role/postgresql/pg_hba.conf
  252. 7  episode-347/blog-after/config/rubber/role/postgresql/postgresql-sysctl.conf
  253. 574  episode-347/blog-after/config/rubber/role/postgresql/postgresql.conf
  254. 23  episode-347/blog-after/config/rubber/role/postgresql_slave/collectd-postgresql-threshold.conf
  255. 135  episode-347/blog-after/config/rubber/role/postgresql_slave/recovery.conf
  256. 10  episode-347/blog-after/config/rubber/role/web_tools/haproxy-nginx.conf
  257. 11  episode-347/blog-after/config/rubber/role/web_tools/monit-admin-nginx.conf
  258. 18  episode-347/blog-after/config/rubber/role/web_tools/rubber-web-tools-haproxy.html
  259. 19  episode-347/blog-after/config/rubber/role/web_tools/rubber-web-tools-monit.html
  260. 114  episode-347/blog-after/config/rubber/role/web_tools/tools-apache-vhost.conf
  261. 7  episode-347/blog-after/config/rubber/role/web_tools/tools-apache.auth
  262. 38  episode-347/blog-after/config/rubber/role/web_tools/tools-index.html
  263. 6  episode-347/blog-after/config/rubber/rubber-apache.yml
  264. 11  episode-347/blog-after/config/rubber/rubber-collectd.yml
  265. 40  episode-347/blog-after/config/rubber/rubber-complete.yml
  266. 85  episode-347/blog-after/config/rubber/rubber-dns.yml
  267. 12  episode-347/blog-after/config/rubber/rubber-elasticsearch.yml
  268. 22  episode-347/blog-after/config/rubber/rubber-graphite.yml
  269. 42  episode-347/blog-after/config/rubber/rubber-graylog.yml
  270. 7  episode-347/blog-after/config/rubber/rubber-haproxy.yml
  271. 8  episode-347/blog-after/config/rubber/rubber-mongodb.yml
  272. 11  episode-347/blog-after/config/rubber/rubber-monit.yml
  273. 16  episode-347/blog-after/config/rubber/rubber-passenger.yml
  274. 45  episode-347/blog-after/config/rubber/rubber-postgresql.yml
  275. 42  episode-347/blog-after/config/rubber/rubber-rvm.yml
  276. 305  episode-347/blog-after/config/rubber/rubber.yml
  277. 10  episode-347/blog-after/db/migrate/20120503014703_create_articles.rb
  278. 7  episode-347/blog-after/db/seeds.rb
  279. 2  episode-347/blog-after/doc/README_FOR_APP
  280. 0  episode-347/blog-after/log/.gitkeep
  281. 26  episode-347/blog-after/public/404.html
  282. 26  episode-347/blog-after/public/422.html
  283. 25  episode-347/blog-after/public/500.html
  284. 0  episode-347/blog-after/public/favicon.ico
  285. 241  episode-347/blog-after/public/index.html
  286. 5  episode-347/blog-after/public/robots.txt
  287. 107  episode-347/blog-after/script/collectd/collectd-runner.rb
  288. 19  episode-347/blog-after/script/collectd/role/examples/example_db_query.rb
  289. 1  episode-347/blog-after/script/collectd/role/examples/example_simple.rb
  290. 31  episode-347/blog-after/script/collectd/role/postgresql_slave/replication_status.rb
  291. 12  episode-347/blog-after/script/collectd/role/web_tools/global_worker_stats.rb
  292. 8  episode-347/blog-after/script/collectd/role/web_tools/resque_jobs_processed.rb
  293. 6  episode-347/blog-after/script/rails
  294. 8  episode-347/blog-after/script/rubber
  295. 0  episode-347/blog-after/test/fixtures/.gitkeep
  296. 9  episode-347/blog-after/test/fixtures/articles.yml
  297. 0  episode-347/blog-after/test/functional/.gitkeep
  298. 49  episode-347/blog-after/test/functional/articles_controller_test.rb
  299. 0  episode-347/blog-after/test/integration/.gitkeep
  300. 12  episode-347/blog-after/test/performance/browsing_test.rb
  301. 13  episode-347/blog-after/test/test_helper.rb
  302. 0  episode-347/blog-after/test/unit/.gitkeep
  303. 7  episode-347/blog-after/test/unit/article_test.rb
  304. 4  episode-347/blog-after/test/unit/helpers/articles_helper_test.rb
  305. 0  episode-347/blog-after/vendor/assets/javascripts/.gitkeep
  306. 0  episode-347/blog-after/vendor/assets/stylesheets/.gitkeep
  307. 0  episode-347/blog-after/vendor/plugins/.gitkeep
  308. 0  tasks/.gitkeep b/episode-346/signup-after/lib/tasks/.gitkeep
  309. 0  tasks/.gitkeep b/episode-346/signup-before/lib/tasks/.gitkeep
  310. 0  tasks/.gitkeep b/episode-347/blog-after/lib/tasks/.gitkeep
0  assets/.gitkeep b/episode-346/signup-after/lib/assets/.gitkeep
No changes.
0  assets/.gitkeep b/episode-346/signup-before/lib/assets/.gitkeep
No changes.
0  assets/.gitkeep b/episode-347/blog-after/lib/assets/.gitkeep
No changes.
11  episode-346/README.md
Source Rendered
... ...
@@ -0,0 +1,11 @@
  1
+# RailsCasts Episode #346: Wizard Forms with Wicked
  2
+
  3
+http://railscasts.com/episodes/346-wizard-forms-with-wicked
  4
+
  5
+Requires Ruby 1.9.2 or higher.
  6
+
  7
+### Commands used in this episode
  8
+
  9
+```
  10
+rails g controller user_steps
  11
+```
15  episode-346/signup-after/.gitignore
... ...
@@ -0,0 +1,15 @@
  1
+# See http://help.github.com/ignore-files/ for more about ignoring files.
  2
+#
  3
+# If you find yourself ignoring temporary files generated by your text editor
  4
+# or operating system, you probably want to add a global ignore instead:
  5
+#   git config --global core.excludesfile ~/.gitignore_global
  6
+
  7
+# Ignore bundler config
  8
+/.bundle
  9
+
  10
+# Ignore the default SQLite database.
  11
+/db/*.sqlite3
  12
+
  13
+# Ignore all logfiles and tempfiles.
  14
+/log/*.log
  15
+/tmp
40  episode-346/signup-after/Gemfile
... ...
@@ -0,0 +1,40 @@
  1
+source 'https://rubygems.org'
  2
+
  3
+gem 'rails', '3.2.3'
  4
+
  5
+# Bundle edge Rails instead:
  6
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
  7
+
  8
+gem 'sqlite3'
  9
+
  10
+
  11
+# Gems used only for assets and not required
  12
+# in production environments by default.
  13
+group :assets do
  14
+  gem 'sass-rails',   '~> 3.2.3'
  15
+  gem 'coffee-rails', '~> 3.2.1'
  16
+
  17
+  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  18
+  # gem 'therubyracer', :platform => :ruby
  19
+
  20
+  gem 'uglifier', '>= 1.0.3'
  21
+end
  22
+
  23
+gem 'jquery-rails'
  24
+
  25
+# To use ActiveModel has_secure_password
  26
+gem 'bcrypt-ruby', '~> 3.0.0'
  27
+
  28
+# To use Jbuilder templates for JSON
  29
+# gem 'jbuilder'
  30
+
  31
+# Use unicorn as the app server
  32
+# gem 'unicorn'
  33
+
  34
+# Deploy with Capistrano
  35
+# gem 'capistrano'
  36
+
  37
+# To use debugger
  38
+# gem 'ruby-debug19', :require => 'ruby-debug'
  39
+
  40
+gem 'wicked'
117  episode-346/signup-after/Gemfile.lock
... ...
@@ -0,0 +1,117 @@
  1
+GEM
  2
+  remote: https://rubygems.org/
  3
+  specs:
  4
+    actionmailer (3.2.3)
  5
+      actionpack (= 3.2.3)
  6
+      mail (~> 2.4.4)
  7
+    actionpack (3.2.3)
  8
+      activemodel (= 3.2.3)
  9
+      activesupport (= 3.2.3)
  10
+      builder (~> 3.0.0)
  11
+      erubis (~> 2.7.0)
  12
+      journey (~> 1.0.1)
  13
+      rack (~> 1.4.0)
  14
+      rack-cache (~> 1.2)
  15
+      rack-test (~> 0.6.1)
  16
+      sprockets (~> 2.1.2)
  17
+    activemodel (3.2.3)
  18
+      activesupport (= 3.2.3)
  19
+      builder (~> 3.0.0)
  20
+    activerecord (3.2.3)
  21
+      activemodel (= 3.2.3)
  22
+      activesupport (= 3.2.3)
  23
+      arel (~> 3.0.2)
  24
+      tzinfo (~> 0.3.29)
  25
+    activeresource (3.2.3)
  26
+      activemodel (= 3.2.3)
  27
+      activesupport (= 3.2.3)
  28
+    activesupport (3.2.3)
  29
+      i18n (~> 0.6)
  30
+      multi_json (~> 1.0)
  31
+    arel (3.0.2)
  32
+    bcrypt-ruby (3.0.1)
  33
+    builder (3.0.0)
  34
+    coffee-rails (3.2.2)
  35
+      coffee-script (>= 2.2.0)
  36
+      railties (~> 3.2.0)
  37
+    coffee-script (2.2.0)
  38
+      coffee-script-source
  39
+      execjs
  40
+    coffee-script-source (1.3.1)
  41
+    erubis (2.7.0)
  42
+    execjs (1.3.1)
  43
+      multi_json (~> 1.0)
  44
+    hike (1.2.1)
  45
+    i18n (0.6.0)
  46
+    journey (1.0.3)
  47
+    jquery-rails (2.0.2)
  48
+      railties (>= 3.2.0, < 5.0)
  49
+      thor (~> 0.14)
  50
+    json (1.7.0)
  51
+    mail (2.4.4)
  52
+      i18n (>= 0.4.0)
  53
+      mime-types (~> 1.16)
  54
+      treetop (~> 1.4.8)
  55
+    mime-types (1.18)
  56
+    multi_json (1.3.4)
  57
+    polyglot (0.3.3)
  58
+    rack (1.4.1)
  59
+    rack-cache (1.2)
  60
+      rack (>= 0.4)
  61
+    rack-ssl (1.3.2)
  62
+      rack
  63
+    rack-test (0.6.1)
  64
+      rack (>= 1.0)
  65
+    rails (3.2.3)
  66
+      actionmailer (= 3.2.3)
  67
+      actionpack (= 3.2.3)
  68
+      activerecord (= 3.2.3)
  69
+      activeresource (= 3.2.3)
  70
+      activesupport (= 3.2.3)
  71
+      bundler (~> 1.0)
  72
+      railties (= 3.2.3)
  73
+    railties (3.2.3)
  74
+      actionpack (= 3.2.3)
  75
+      activesupport (= 3.2.3)
  76
+      rack-ssl (~> 1.3.2)
  77
+      rake (>= 0.8.7)
  78
+      rdoc (~> 3.4)
  79
+      thor (~> 0.14.6)
  80
+    rake (0.9.2.2)
  81
+    rdoc (3.12)
  82
+      json (~> 1.4)
  83
+    sass (3.1.16)
  84
+    sass-rails (3.2.5)
  85
+      railties (~> 3.2.0)
  86
+      sass (>= 3.1.10)
  87
+      tilt (~> 1.3)
  88
+    sprockets (2.1.3)
  89
+      hike (~> 1.2)
  90
+      rack (~> 1.0)
  91
+      tilt (~> 1.1, != 1.3.0)
  92
+    sqlite3 (1.3.6)
  93
+    thor (0.14.6)
  94
+    tilt (1.3.3)
  95
+    treetop (1.4.10)
  96
+      polyglot
  97
+      polyglot (>= 0.3.1)
  98
+    tzinfo (0.3.33)
  99
+    uglifier (1.2.4)
  100
+      execjs (>= 0.3.0)
  101
+      multi_json (>= 1.0.2)
  102
+    wicked (0.1.4)
  103
+      activesupport (>= 3.0.7)
  104
+      rails (>= 3.0.7)
  105
+
  106
+PLATFORMS
  107
+  ruby
  108
+
  109
+DEPENDENCIES
  110
+  bcrypt-ruby (~> 3.0.0)
  111
+  coffee-rails (~> 3.2.1)
  112
+  jquery-rails
  113
+  rails (= 3.2.3)
  114
+  sass-rails (~> 3.2.3)
  115
+  sqlite3
  116
+  uglifier (>= 1.0.3)
  117
+  wicked
9  episode-346/signup-after/README.rdoc
Source Rendered
... ...
@@ -0,0 +1,9 @@
  1
+= RailsCasts Example Application
  2
+
  3
+Run these commands to try it out.
  4
+
  5
+  bundle
  6
+  rake db:setup
  7
+  rails s
  8
+
  9
+Requires Ruby 1.9.2 or later to run.
7  episode-346/signup-after/Rakefile
... ...
@@ -0,0 +1,7 @@
  1
+#!/usr/bin/env rake
  2
+# Add your own tasks in files placed in lib/tasks ending in .rake,
  3
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
  4
+
  5
+require File.expand_path('../config/application', __FILE__)
  6
+
  7
+Signup::Application.load_tasks
BIN  episode-346/signup-after/app/assets/images/rails.png
15  episode-346/signup-after/app/assets/javascripts/application.js
... ...
@@ -0,0 +1,15 @@
  1
+// This is a manifest file that'll be compiled into application.js, which will include all the files
  2
+// listed below.
  3
+//
  4
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
  5
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
  6
+//
  7
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
  8
+// the compiled file.
  9
+//
  10
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
  11
+// GO AFTER THE REQUIRES BELOW.
  12
+//
  13
+//= require jquery
  14
+//= require jquery_ujs
  15
+//= require_tree .
3  episode-346/signup-after/app/assets/javascripts/user_steps.js.coffee
... ...
@@ -0,0 +1,3 @@
  1
+# Place all the behaviors and hooks related to the matching controller here.
  2
+# All this logic will automatically be available in application.js.
  3
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
3  episode-346/signup-after/app/assets/javascripts/users.js.coffee
... ...
@@ -0,0 +1,3 @@
  1
+# Place all the behaviors and hooks related to the matching controller here.
  2
+# All this logic will automatically be available in application.js.
  3
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
98  episode-346/signup-after/app/assets/stylesheets/application.css
... ...
@@ -0,0 +1,98 @@
  1
+/*
  2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
  3
+ * listed below.
  4
+ *
  5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
  6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
  7
+ *
  8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
  9
+ * compiled file, but it's generally better to create a new file per style scope.
  10
+ *
  11
+ *= require_self
  12
+ *= require_tree .
  13
+*/
  14
+
  15
+html, body {
  16
+  background-color: #4B7399;
  17
+  font-family: Verdana, Helvetica, Arial;
  18
+  font-size: 14px;
  19
+}
  20
+
  21
+a img {
  22
+  border: none;
  23
+}
  24
+
  25
+a {
  26
+  color: #0000FF;
  27
+}
  28
+
  29
+.clear {
  30
+  clear: both;
  31
+  height: 0;
  32
+  overflow: hidden;
  33
+}
  34
+
  35
+#container {
  36
+  width: 75%;
  37
+  margin: 0 auto;
  38
+  background-color: #FFF;
  39
+  padding: 20px 40px;
  40
+  border: solid 1px black;
  41
+  margin-top: 20px;
  42
+}
  43
+
  44
+#flash_notice, #flash_error, #flash_alert {
  45
+  padding: 5px 8px;
  46
+  margin: 10px 0;
  47
+}
  48
+
  49
+#flash_notice {
  50
+  background-color: #CFC;
  51
+  border: solid 1px #6C6;
  52
+}
  53
+
  54
+#flash_error, #flash_alert {
  55
+  background-color: #FCC;
  56
+  border: solid 1px #C66;
  57
+}
  58
+
  59
+.field_with_errors {
  60
+  display: inline;
  61
+}
  62
+
  63
+.error_messages {
  64
+  width: 400px;
  65
+  border: 2px solid #CF0000;
  66
+  padding: 0px;
  67
+  padding-bottom: 12px;
  68
+  margin-bottom: 20px;
  69
+  background-color: #f0f0f0;
  70
+  font-size: 12px;
  71
+}
  72
+
  73
+.error_messages h2 {
  74
+  text-align: left;
  75
+  font-weight: bold;
  76
+  padding: 5px 10px;
  77
+  font-size: 12px;
  78
+  margin: 0;
  79
+  background-color: #c00;
  80
+  color: #fff;
  81
+}
  82
+
  83
+.error_messages p {
  84
+  margin: 8px 10px;
  85
+}
  86
+
  87
+.error_messages ul {
  88
+  margin-bottom: 0;
  89
+}
  90
+
  91
+form .field, form .actions {
  92
+  margin: 12px 0;
  93
+}
  94
+
  95
+form h2 {
  96
+  margin-top: 30px;
  97
+  font-size: 18px;
  98
+}
3  episode-346/signup-after/app/assets/stylesheets/user_steps.css.scss
... ...
@@ -0,0 +1,3 @@
  1
+// Place all the styles related to the user_steps controller here.
  2
+// They will automatically be included in application.css.
  3
+// You can use Sass (SCSS) here: http://sass-lang.com/
3  episode-346/signup-after/app/assets/stylesheets/users.css.scss
... ...
@@ -0,0 +1,3 @@
  1
+// Place all the styles related to the users controller here.
  2
+// They will automatically be included in application.css.
  3
+// You can use Sass (SCSS) here: http://sass-lang.com/
10  episode-346/signup-after/app/controllers/application_controller.rb
... ...
@@ -0,0 +1,10 @@
  1
+class ApplicationController < ActionController::Base
  2
+  protect_from_forgery
  3
+
  4
+private
  5
+
  6
+  def current_user
  7
+    @current_user ||= User.find_by_id(session[:user_id]) if session[:user_id]
  8
+  end
  9
+  helper_method :current_user
  10
+end
21  episode-346/signup-after/app/controllers/user_steps_controller.rb
... ...
@@ -0,0 +1,21 @@
  1
+class UserStepsController < ApplicationController
  2
+  include Wicked::Wizard
  3
+  steps :personal, :social
  4
+  
  5
+  def show
  6
+    @user = current_user
  7
+    render_wizard
  8
+  end
  9
+  
  10
+  def update
  11
+    @user = current_user
  12
+    @user.attributes = params[:user]
  13
+    render_wizard @user
  14
+  end
  15
+  
  16
+private
  17
+
  18
+  def redirect_to_finish_wizard
  19
+    redirect_to root_url, notice: "Thank you for signing up."
  20
+  end
  21
+end
18  episode-346/signup-after/app/controllers/users_controller.rb
... ...
@@ -0,0 +1,18 @@
  1
+class UsersController < ApplicationController
  2
+  def index
  3
+  end
  4
+
  5
+  def new
  6
+    @user = User.new
  7
+  end
  8
+
  9
+  def create
  10
+    @user = User.new(params[:user])
  11
+    if @user.save
  12
+      session[:user_id] = @user.id
  13
+      redirect_to user_steps_path
  14
+    else
  15
+      render :new
  16
+    end
  17
+  end
  18
+end
2  episode-346/signup-after/app/helpers/application_helper.rb
... ...
@@ -0,0 +1,2 @@
  1
+module ApplicationHelper
  2
+end
2  episode-346/signup-after/app/helpers/user_steps_helper.rb
... ...
@@ -0,0 +1,2 @@
  1
+module UserStepsHelper
  2
+end
2  episode-346/signup-after/app/helpers/users_helper.rb
... ...
@@ -0,0 +1,2 @@
  1
+module UsersHelper
  2
+end
0  episode-346/signup-after/app/mailers/.gitkeep
No changes.
0  episode-346/signup-after/app/models/.gitkeep
No changes.
7  episode-346/signup-after/app/models/user.rb
... ...
@@ -0,0 +1,7 @@
  1
+class User < ActiveRecord::Base
  2
+  attr_accessible :bio, :date_of_birth, :email, :github_username, :name, :password, :password_confirmation, :twitter_username, :website
  3
+  has_secure_password
  4
+  
  5
+  validates_format_of :twitter_username, without: /\W/, allow_blank: true
  6
+  # validates_presence_of :twitter_username, if: :on_social_step?
  7
+end
17  episode-346/signup-after/app/views/layouts/application.html.erb
... ...
@@ -0,0 +1,17 @@
  1
+<!DOCTYPE html>
  2
+<html>
  3
+  <head>
  4
+    <title>Sign Up</title>
  5
+    <%= stylesheet_link_tag    "application", media: "all" %>
  6
+    <%= javascript_include_tag "application" %>
  7
+    <%= csrf_meta_tag %>
  8
+  </head>
  9
+  <body>
  10
+    <div id="container">
  11
+      <% flash.each do |name, msg| %>
  12
+        <%= content_tag :div, msg, id: "flash_#{name}" %>
  13
+      <% end %>
  14
+      <%= yield %>
  15
+    </div>
  16
+  </body>
  17
+</html>
18  episode-346/signup-after/app/views/user_steps/_form.html.erb
... ...
@@ -0,0 +1,18 @@
  1
+<%= form_for @user, url: wizard_path do |f| %>
  2
+  <% if @user.errors.any? %>
  3
+    <div class="error_messages">
  4
+      <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
  5
+      <ul>
  6
+      <% @user.errors.full_messages.each do |msg| %>
  7
+        <li><%= msg %></li>
  8
+      <% end %>
  9
+      </ul>
  10
+    </div>
  11
+  <% end %>
  12
+  <%= yield f %>
  13
+  
  14
+  <div class="actions">
  15
+    <%= f.submit "Continue" %>
  16
+    or <%= link_to "skip this step", next_wizard_path %>
  17
+  </div>
  18
+<% end %>
16  episode-346/signup-after/app/views/user_steps/personal.html.erb
... ...
@@ -0,0 +1,16 @@
  1
+<h1>Tell us a little about yourself.</h1>
  2
+
  3
+<%= render layout: 'form' do |f| %>
  4
+  <div class="field">
  5
+    <%= f.label :name %><br />
  6
+    <%= f.text_field :name %>
  7
+  </div>
  8
+  <div class="field">
  9
+    <%= f.label :date_of_birth %><br />
  10
+    <%= f.date_select :date_of_birth, start_year: 1900, end_year: Date.today.year, include_blank: true %>
  11
+  </div>
  12
+  <div class="field">
  13
+    <%= f.label :bio %><br />
  14
+    <%= f.text_area :bio, rows: 5 %>
  15
+  </div>
  16
+<% end %>
16  episode-346/signup-after/app/views/user_steps/social.html.erb
... ...
@@ -0,0 +1,16 @@
  1
+<h1>Where can we find you?</h1>
  2
+
  3
+<%= render layout: 'form' do |f| %>
  4
+  <div class="field">
  5
+    <%= f.label :twitter_username %><br />
  6
+    <%= f.text_field :twitter_username %>
  7
+  </div>
  8
+  <div class="field">
  9
+    <%= f.label :github_username %><br />
  10
+    <%= f.text_field :github_username %>
  11
+  </div>
  12
+  <div class="field">
  13
+    <%= f.label :website %><br />
  14
+    <%= f.text_field :website %>
  15
+  </div>
  16
+<% end %>
11  episode-346/signup-after/app/views/users/index.html.erb
... ...
@@ -0,0 +1,11 @@
  1
+<h1>Welcome</h1>
  2
+
  3
+<% if current_user.nil? %>
  4
+  <p>Currently not signed in. <%= link_to "Sign Up", new_user_path %></p>
  5
+<% else %>
  6
+  <p>Currently signed in as:</p>
  7
+  <p><b>Email:</b> <%= current_user.email %></p>
  8
+  <p><b>Name:</b> <%= current_user.name %></p>
  9
+  <%= simple_format current_user.bio %>
  10
+  <p><%= link_to "Sign Up Again", new_user_path %></p>
  11
+<% end %>
31  episode-346/signup-after/app/views/users/new.html.erb
... ...
@@ -0,0 +1,31 @@
  1
+<h1>Sign Up</h1>
  2
+
  3
+<%= form_for @user do |f| %>
  4
+  <% if @user.errors.any? %>
  5
+    <div class="error_messages">
  6
+      <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
  7
+      <ul>
  8
+      <% @user.errors.full_messages.each do |msg| %>
  9
+        <li><%= msg %></li>
  10
+      <% end %>
  11
+      </ul>
  12
+    </div>
  13
+  <% end %>
  14
+
  15
+  <div class="field">
  16
+    <%= f.label :email %><br />
  17
+    <%= f.text_field :email %>
  18
+  </div>
  19
+  <div class="field">
  20
+    <%= f.label :password %><br />
  21
+    <%= f.password_field :password %>
  22
+  </div>
  23
+  <div class="field">
  24
+    <%= f.label :password_confirmation %><br />
  25
+    <%= f.password_field :password_confirmation %>
  26
+  </div>
  27
+
  28
+  <div class="actions">
  29
+    <%= f.submit "Sign Up" %>
  30
+  </div>
  31
+<% end %>
4  episode-346/signup-after/config.ru
... ...
@@ -0,0 +1,4 @@
  1
+# This file is used by Rack-based servers to start the application.
  2
+
  3
+require ::File.expand_path('../config/environment',  __FILE__)
  4
+run Signup::Application
59  episode-346/signup-after/config/application.rb
... ...
@@ -0,0 +1,59 @@
  1
+require File.expand_path('../boot', __FILE__)
  2
+
  3
+require 'rails/all'
  4
+
  5
+if defined?(Bundler)
  6
+  # If you precompile assets before deploying to production, use this line
  7
+  Bundler.require(*Rails.groups(:assets => %w(development test)))
  8
+  # If you want your assets lazily compiled in production, use this line
  9
+  # Bundler.require(:default, :assets, Rails.env)
  10
+end
  11
+
  12
+module Signup
  13
+  class Application < Rails::Application
  14
+    # Settings in config/environments/* take precedence over those specified here.
  15
+    # Application configuration should go into files in config/initializers
  16
+    # -- all .rb files in that directory are automatically loaded.
  17
+
  18
+    # Custom directories with classes and modules you want to be autoloadable.
  19
+    # config.autoload_paths += %W(#{config.root}/extras)
  20
+
  21
+    # Only load the plugins named here, in the order given (default is alphabetical).
  22
+    # :all can be used as a placeholder for all plugins not explicitly named.
  23
+    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
  24
+
  25
+    # Activate observers that should always be running.
  26
+    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
  27
+
  28
+    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
  29
+    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
  30
+    # config.time_zone = 'Central Time (US & Canada)'
  31
+
  32
+    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
  33
+    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
  34
+    # config.i18n.default_locale = :de
  35
+
  36
+    # Configure the default encoding used in templates for Ruby 1.9.
  37
+    config.encoding = "utf-8"
  38
+
  39
+    # Configure sensitive parameters which will be filtered from the log file.
  40
+    config.filter_parameters += [:password]
  41
+
  42
+    # Use SQL instead of Active Record's schema dumper when creating the database.
  43
+    # This is necessary if your schema can't be completely dumped by the schema dumper,
  44
+    # like if you have constraints or database-specific column types
  45
+    # config.active_record.schema_format = :sql
  46
+
  47
+    # Enforce whitelist mode for mass assignment.
  48
+    # This will create an empty whitelist of attributes available for mass-assignment for all models
  49
+    # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
  50
+    # parameters by using an attr_accessible or attr_protected declaration.
  51
+    config.active_record.whitelist_attributes = true
  52
+
  53
+    # Enable the asset pipeline
  54
+    config.assets.enabled = true
  55
+
  56
+    # Version of your assets, change this if you want to expire all your assets
  57
+    config.assets.version = '1.0'
  58
+  end
  59
+end
6  episode-346/signup-after/config/boot.rb
... ...
@@ -0,0 +1,6 @@
  1
+require 'rubygems'
  2
+
  3
+# Set up gems listed in the Gemfile.
  4
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
  5
+
  6
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
25  episode-346/signup-after/config/database.yml
... ...
@@ -0,0 +1,25 @@
  1
+# SQLite version 3.x
  2
+#   gem install sqlite3
  3
+#
  4
+#   Ensure the SQLite 3 gem is defined in your Gemfile
  5
+#   gem 'sqlite3'
  6
+development:
  7
+  adapter: sqlite3
  8
+  database: db/development.sqlite3
  9
+  pool: 5
  10
+  timeout: 5000
  11
+
  12
+# Warning: The database defined as "test" will be erased and
  13
+# re-generated from your development database when you run "rake".
  14
+# Do not set this db to the same as development or production.
  15
+test:
  16
+  adapter: sqlite3
  17
+  database: db/test.sqlite3
  18
+  pool: 5
  19
+  timeout: 5000
  20
+
  21
+production:
  22
+  adapter: sqlite3
  23
+  database: db/production.sqlite3
  24
+  pool: 5
  25
+  timeout: 5000
5  episode-346/signup-after/config/environment.rb
... ...
@@ -0,0 +1,5 @@
  1
+# Load the rails application
  2
+require File.expand_path('../application', __FILE__)
  3
+
  4
+# Initialize the rails application
  5
+Signup::Application.initialize!
37  episode-346/signup-after/config/environments/development.rb
... ...
@@ -0,0 +1,37 @@
  1
+Signup::Application.configure do
  2
+  # Settings specified here will take precedence over those in config/application.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 web server 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_controller.perform_caching = false
  15
+
  16
+  # Don't care if the mailer can't send
  17
+  config.action_mailer.raise_delivery_errors = false
  18
+
  19
+  # Print deprecation notices to the Rails logger
  20
+  config.active_support.deprecation = :log
  21
+
  22
+  # Only use best-standards-support built into browsers
  23
+  config.action_dispatch.best_standards_support = :builtin
  24
+
  25
+  # Raise exception on mass assignment protection for Active Record models
  26
+  config.active_record.mass_assignment_sanitizer = :strict
  27
+
  28
+  # Log the query plan for queries taking more than this (works
  29
+  # with SQLite, MySQL, and PostgreSQL)
  30
+  config.active_record.auto_explain_threshold_in_seconds = 0.5
  31
+
  32
+  # Do not compress assets
  33
+  config.assets.compress = false
  34
+
  35
+  # Expands the lines which load the assets
  36
+  config.assets.debug = true
  37
+end
67  episode-346/signup-after/config/environments/production.rb
... ...
@@ -0,0 +1,67 @@
  1
+Signup::Application.configure do
  2
+  # Settings specified here will take precedence over those in config/application.rb
  3
+
  4
+  # Code is not reloaded between requests
  5
+  config.cache_classes = true
  6
+
  7
+  # Full error reports are disabled and caching is turned on
  8
+  config.consider_all_requests_local       = false
  9
+  config.action_controller.perform_caching = true
  10
+
  11
+  # Disable Rails's static asset server (Apache or nginx will already do this)
  12
+  config.serve_static_assets = false
  13
+
  14
+  # Compress JavaScripts and CSS
  15
+  config.assets.compress = true
  16
+
  17
+  # Don't fallback to assets pipeline if a precompiled asset is missed
  18
+  config.assets.compile = false
  19
+
  20
+  # Generate digests for assets URLs
  21
+  config.assets.digest = true
  22
+
  23
+  # Defaults to Rails.root.join("public/assets")
  24
+  # config.assets.manifest = YOUR_PATH
  25
+
  26
+  # Specifies the header that your server uses for sending files
  27
+  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  28
+  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
  29
+
  30
+  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  31
+  # config.force_ssl = true
  32
+
  33
+  # See everything in the log (default is :info)
  34
+  # config.log_level = :debug
  35
+
  36
+  # Prepend all log lines with the following tags
  37
+  # config.log_tags = [ :subdomain, :uuid ]
  38
+
  39
+  # Use a different logger for distributed setups
  40
+  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
  41
+
  42
+  # Use a different cache store in production
  43
+  # config.cache_store = :mem_cache_store
  44
+
  45
+  # Enable serving of images, stylesheets, and JavaScripts from an asset server
  46
+  # config.action_controller.asset_host = "http://assets.example.com"
  47
+
  48
+  # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
  49
+  # config.assets.precompile += %w( search.js )
  50
+
  51
+  # Disable delivery errors, bad email addresses will be ignored
  52
+  # config.action_mailer.raise_delivery_errors = false
  53
+
  54
+  # Enable threaded mode
  55
+  # config.threadsafe!
  56
+
  57
+  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  58
+  # the I18n.default_locale when a translation can not be found)
  59
+  config.i18n.fallbacks = true
  60
+
  61
+  # Send deprecation notices to registered listeners
  62
+  config.active_support.deprecation = :notify
  63
+
  64
+  # Log the query plan for queries taking more than this (works
  65
+  # with SQLite, MySQL, and PostgreSQL)
  66
+  # config.active_record.auto_explain_threshold_in_seconds = 0.5
  67
+end
37  episode-346/signup-after/config/environments/test.rb
... ...
@@ -0,0 +1,37 @@
  1
+Signup::Application.configure do
  2
+  # Settings specified here will take precedence over those in config/application.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
+  # Configure static asset server for tests with Cache-Control for performance
  11
+  config.serve_static_assets = true
  12
+  config.static_cache_control = "public, max-age=3600"
  13
+
  14
+  # Log error messages when you accidentally call methods on nil
  15
+  config.whiny_nils = true
  16
+
  17
+  # Show full error reports and disable caching
  18
+  config.consider_all_requests_local       = true
  19
+  config.action_controller.perform_caching = false
  20
+
  21
+  # Raise exceptions instead of rendering exception templates
  22
+  config.action_dispatch.show_exceptions = false
  23
+
  24
+  # Disable request forgery protection in test environment
  25
+  config.action_controller.allow_forgery_protection    = false
  26
+
  27
+  # Tell Action Mailer not to deliver emails to the real world.
  28
+  # The :test delivery method accumulates sent emails in the
  29
+  # ActionMailer::Base.deliveries array.
  30
+  config.action_mailer.delivery_method = :test
  31
+
  32
+  # Raise exception on mass assignment protection for Active Record models
  33
+  config.active_record.mass_assignment_sanitizer = :strict
  34
+
  35
+  # Print deprecation notices to the stderr
  36
+  config.active_support.deprecation = :stderr
  37
+end
7  episode-346/signup-after/config/initializers/backtrace_silencers.rb
... ...
@@ -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!
15  episode-346/signup-after/config/initializers/inflections.rb
... ...
@@ -0,0 +1,15 @@
  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
  11
+#
  12
+# These inflection rules are supported but not enabled by default:
  13
+# ActiveSupport::Inflector.inflections do |inflect|
  14
+#   inflect.acronym 'RESTful'
  15
+# end
5  episode-346/signup-after/config/initializers/mime_types.rb
... ...
@@ -0,0 +1,5 @@
  1
+# Be sure to restart your server when you modify this file.
  2
+
  3
+# Add new mime types for use in respond_to blocks:
  4
+# Mime::Type.register "text/richtext", :rtf
  5
+# Mime::Type.register_alias "text/html", :iphone
7  episode-346/signup-after/config/initializers/secret_token.rb
... ...
@@ -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
+Signup::Application.config.secret_token = 'dded40096250510a8734beb3cda4fe2fd7823e6134d655aa5f7bf9de276d2adb4714145904692a796b81673068fee8a192f7f2487aa030e8cb9ecc30b7ee0648'
8  episode-346/signup-after/config/initializers/session_store.rb
... ...
@@ -0,0 +1,8 @@
  1
+# Be sure to restart your server when you modify this file.
  2
+
  3
+Signup::Application.config.session_store :cookie_store, key: '_signup_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 "rails generate session_migration")
  8
+# Signup::Application.config.session_store :active_record_store
14  episode-346/signup-after/config/initializers/wrap_parameters.rb
... ...
@@ -0,0 +1,14 @@
  1
+# Be sure to restart your server when you modify this file.
  2
+#
  3
+# This file contains settings for ActionController::ParamsWrapper which
  4
+# is enabled by default.
  5
+
  6
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
  7
+ActiveSupport.on_load(:action_controller) do
  8
+  wrap_parameters format: [:json]
  9
+end
  10
+
  11
+# Disable root element in JSON by default.
  12
+ActiveSupport.on_load(:active_record) do
  13
+  self.include_root_in_json = false
  14
+end
5  episode-346/signup-after/config/locales/en.yml
... ...
@@ -0,0 +1,5 @@
  1
+# Sample localization file for English. Add more files in this directory for other locales.
  2
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
  3
+
  4
+en:
  5
+  hello: "Hello world"
5  episode-346/signup-after/config/routes.rb
... ...
@@ -0,0 +1,5 @@
  1
+Signup::Application.routes.draw do
  2
+  resources :users
  3
+  resources :user_steps
  4
+  root to: 'users#index'
  5
+end
16  episode-346/signup-after/db/migrate/20120430195743_create_users.rb
... ...
@@ -0,0 +1,16 @@
  1
+class CreateUsers < ActiveRecord::Migration
  2
+  def change
  3
+    create_table :users do |t|
  4
+      t.string :email
  5
+      t.string :password_digest
  6
+      t.string :name
  7
+      t.string :twitter_username
  8
+      t.string :github_username
  9
+      t.string :website
  10
+      t.date :date_of_birth
  11
+      t.text :bio
  12
+
  13
+      t.timestamps
  14
+    end
  15
+  end
  16
+end
29  episode-346/signup-after/db/schema.rb
... ...
@@ -0,0 +1,29 @@
  1
+# encoding: UTF-8
  2
+# This file is auto-generated from the current state of the database. Instead
  3
+# of editing this file, please use the migrations feature of Active Record to
  4
+# incrementally modify your database, and then regenerate this schema definition.
  5
+#
  6
+# Note that this schema.rb definition is the authoritative source for your