Skip to content
This repository
Browse code

rails 3 changes

  • Loading branch information...
commit 2bc3b934c4311f6684ce67ea23c2b08f1fcc4a5b 1 parent f0e2bdb
OpenCongress authored February 24, 2011

Showing 306 changed files with 34,772 additions and 19,102 deletions. Show diff stats Hide diff stats

  1. 6  .rvmrc
  2. 18  Gemfile
  3. 109  Gemfile.lock
  4. 7  Rakefile
  5. 17  app/controllers/account_controller.rb
  6. 2  app/controllers/admin/stats_controller.rb
  7. 23  app/controllers/api_controller.rb
  8. 33  app/controllers/application_controller.rb
  9. 2  app/controllers/articles_controller.rb
  10. 8  app/controllers/battle_royale_controller.rb
  11. 44  app/controllers/bill_controller.rb
  12. 2  app/controllers/commentary_controller.rb
  13. 4  app/controllers/comments_controller.rb
  14. 4  app/controllers/committee_controller.rb
  15. 5  app/controllers/facebook_controller.rb
  16. 16  app/controllers/friends_controller.rb
  17. 2  app/controllers/gossip_controller.rb
  18. 12  app/controllers/index_controller.rb
  19. 7  app/controllers/issue_controller.rb
  20. 3  app/controllers/money_trail_controller.rb
  21. 26  app/controllers/people_controller.rb
  22. 6  app/controllers/political_notebooks_controller.rb
  23. 12  app/controllers/profile_controller.rb
  24. 19  app/controllers/resources_controller.rb
  25. 33  app/controllers/roll_call_controller.rb
  26. 6  app/controllers/search_controller.rb
  27. 60  app/helpers/application_helper.rb
  28. 48  app/helpers/bill_helper.rb
  29. 1  app/helpers/index_helper.rb
  30. 12  app/helpers/people_helper.rb
  31. 2  app/helpers/profile_helper.rb
  32. 10  app/helpers/roll_call_helper.rb
  33. 4  app/helpers/search_helper.rb
  34. 38  app/helpers/span_link_renderer.rb
  35. 9  app/models/article.rb
  36. 37  app/models/bill.rb
  37. 2  app/models/commentary.rb
  38. 18  app/models/committee.rb
  39. 2  app/models/crp_industry.rb
  40. 4  app/models/crp_interest_group.rb
  41. 1  app/models/gossip.rb
  42. 2  app/models/object_aggregate.rb
  43. 35  app/models/page_view.rb
  44. 79  app/models/person.rb
  45. 8  app/models/roll_call.rb
  46. 2  app/models/roll_call_vote.rb
  47. 2  app/models/search.rb
  48. 14  app/models/subject.rb
  49. 2  app/models/user.rb
  50. 6  app/models/user_notifier.rb
  51. 2  app/views/about/_learn.html.erb
  52. 2  app/views/about/beta_feedback.html.erb
  53. 4  app/views/about/political_notebooks.html.erb
  54. 8  app/views/about/uses.html.erb
  55. 2  app/views/admin/bill_summaries/_new_bill_form.html.erb
  56. 4  app/views/admin/bill_summaries/index.html.erb
  57. 2  app/views/admin/stats/bills.html.erb
  58. 10  app/views/api/index.html.erb
  59. 2  app/views/articles/_archives.html.erb
  60. 4  app/views/articles/_article.html.erb
  61. 8  app/views/articles/_frontpage.html.erb
  62. 10  app/views/articles/_summary.html.erb
  63. 2  app/views/battle_royale/index.html.erb
  64. 12  app/views/bill/_bills_by_type.html.erb
  65. 2  app/views/bill/_carousel.html.erb
  66. 4  app/views/bill/_header.html.erb
  67. 5  app/views/bill/_hot_bill_category.html.erb
  68. 6  app/views/bill/_related_bills_list.html.erb
  69. 2  app/views/bill/_related_bills_panel.html.erb
  70. 2  app/views/bill/_related_oc_blog_articles.html.erb
  71. 20  app/views/bill/_sort_bills.html.erb
  72. 4  app/views/bill/_topic.html.erb
  73. 2  app/views/bill/news_blogs.html.erb
  74. 28  app/views/bill/show.html.erb
  75. 4  app/views/bill/text.html.erb
  76. 2  app/views/commentary/pn_ajax_multiple.js.rjs
  77. 4  app/views/committee/_carousel.html.erb
  78. 2  app/views/committee/_committees_list_most_viewed.html.erb
  79. 2  app/views/committee/_related_committees_panel.html.erb
  80. 4  app/views/committee/_sort_committees.html.erb
  81. 2  app/views/districts/show.html.erb
  82. 2  app/views/facebook/_learn.fbml.erb
  83. 2  app/views/facebook/_learn.html.erb
  84. 2  app/views/friends/_tracking_table.html.erb
  85. 2  app/views/friends/edit.html.erb
  86. 2  app/views/friends/show.html.erb
  87. 7  ...generators/facebook_scaffold/templates/layout.html.erb → app/views/friends/user_mailing_lists.html.erb
  88. 8  app/views/gossip/_related_gossip_panel.html.erb
  89. 16  app/views/index/index.html.erb
  90. 4  app/views/issue/_issue_list.html.erb
  91. 2  app/views/issue/_related_issues_panel.html.erb
  92. 6  app/views/issue/_sort_issues.html.erb
  93. 2  app/views/layouts/_footer.html.erb
  94. 32  app/views/layouts/_header.html.erb
  95. 14  app/views/layouts/_user_nav.html.erb
  96. 16  app/views/layouts/application.html.erb
  97. 2  app/views/layouts/frontpage.html.erb
  98. 2  app/views/mailing_list_items/_add_to_alerts.html.erb
  99. 2  app/views/money_trail/_related_industries_panel.html.erb
  100. 2  app/views/money_trail/show.html.erb
  101. 2  app/views/notebook_items/_add_to_mypn.html.erb
  102. 2  app/views/people/_approval.html.erb
  103. 6  app/views/people/_people_list.html.erb
  104. 4  app/views/people/_people_list_special.html.erb
  105. 2  app/views/people/_related_people_panel.html.erb
  106. 6  app/views/people/compare.html.erb
  107. 2  app/views/people/money.html.erb
  108. 2  app/views/people/votes_with_party.html.erb
  109. 4  app/views/person/_topic.html.erb
  110. 2  app/views/profile/_bill_main_detail.html.erb
  111. 2  app/views/profile/_person_main_detail.html.erb
  112. 6  app/views/profile/_profile_nav.html.erb
  113. 2  app/views/profile/actions.html.erb
  114. 2  app/views/profile/bills.html.erb
  115. 2  app/views/profile/person.html.erb
  116. 6  app/views/profile/pn_ajax.html.erb
  117. 4  app/views/profile/show.html.erb
  118. 2  app/views/resources/bill_status.html.erb
  119. 13  app/views/roll_call/_make_hot.html.erb
  120. 6  app/views/roll_call/_roll_call_details_header.html.erb
  121. 16  app/views/roll_call/show.html.erb
  122. 2  app/views/search/_autocomplete_link.html.erb
  123. 4  app/views/search/_big_search_form.html.erb
  124. 2  app/views/search/_search_form.html.erb
  125. 4  app/views/search/result.html.erb
  126. 6  app/views/shared/_blogs.html.erb
  127. 6  app/views/shared/_carousel.html.erb
  128. 6  app/views/shared/_comment_form2.html.erb
  129. 6  app/views/shared/_comment_form_recursive.html.erb
  130. 2  app/views/shared/_commentary.html.erb
  131. 8  app/views/shared/_comments2.html.erb
  132. 3  app/views/shared/_comments3.html.erb
  133. 17  app/views/shared/_comments_recursive.html.erb
  134. 8  app/views/shared/_custom_sidebar_item.html.erb
  135. 6  app/views/shared/_news.html.erb
  136. 8  app/views/shared/_single_comment_out_of_context.html.erb
  137. 6  app/views/shared/_sort_commentary.html.erb
  138. 6  app/views/shared/_sort_comments.html.erb
  139. 2  app/views/shared/_timeframe_select.html.erb
  140. 32  app/views/shared/_track_link.html.erb
  141. 8  app/views/shared/_user_add.html.erb
  142. 18  app/views/shared/_user_content.html.erb
  143. 2  app/views/shared/_video.html.erb
  144. 2  app/views/shared/_videos.html.erb
  145. 12  app/views/simple_captcha/_simple_captcha.erb
  146. 4  app/views/states/show.html.erb
  147. 2  bin/commentary_cleanup.rb
  148. 2  bin/crp/maplight_bill_positions.rb
  149. 2  bin/daily/daily_gpo_billtext_timestamps.rb
  150. 4  bin/daily/daily_parse_amendments.rb
  151. 22  bin/daily/daily_parse_bill_text.rb
  152. 6  bin/daily/daily_parse_bills.rb
  153. 8  bin/daily/daily_parse_opensecrets.rb
  154. 4  bin/daily/daily_parse_people.rb
  155. 2  bin/daily/daily_parse_rolls.rb
  156. 2  bin/daily/project_vote_smart.rb
  157. 2  bin/daily/sponsored_bill_stats.rb
  158. 4  bin/dump_committee_names.rb
  159. 2  bin/fix_bill_subject.rb
  160. 2  bin/govtrack_parse_bills.rb
  161. 2  bin/govtrack_parse_committee_schedules.rb
  162. 2  bin/govtrack_parse_people.rb
  163. 2  bin/load_district_centers.rb
  164. 2  bin/parse_individual_bills.rb
  165. 3  bin/parse_today_in_congress.rb
  166. 4  bin/thomas_fetch_committee_reports.rb
  167. 2  bin/thomas_parse_committee_reports.rb
  168. 2  config.ru
  169. 44  config/application.rb
  170. 60  config/application_settings.yml
  171. 138  config/boot.rb
  172. 136  config/environment.rb
  173. 40  config/environments/development.rb
  174. 2  config/environments/drm.rb
  175. 60  config/environments/production.rb
  176. 13  config/environments/staging.rb
  177. 47  config/environments/test.rb
  178. 67  config/initializers/acts_as_taggable_fix.rb
  179. 5  config/initializers/api_keys.rb
  180. 44  config/initializers/detect_named_route_clashes.rb
  181. 142  config/initializers/devise.rb
  182. 12  config/initializers/devise_oc_overrides.rb
  183. 2  config/initializers/govkit.rb
  184. 2  config/initializers/hoptoad.rb
  185. 24  config/initializers/money_precision_monkeypatch.rb
  186. 2  config/initializers/secret_token.rb
  187. 4  config/initializers/session_store.rb
  188. 5  config/initializers/settings.rb
  189. 3  config/initializers/will_paginate.rb
  190. 39  config/locales/devise.en.yml
  191. 66  config/routes.rb
  192. 23  config/solr.yml
  193. 27,072  db/articles.yml
  194. 2  db/migrate/20101001114446_materialized_views.rb
  195. 15,139  db/people.yml
  196. 6  lib/apache_ban.rb
  197. 10  lib/authenticated_system.rb
  198. 6  lib/commentary_parser.rb
  199. 4  lib/memcache_expiration.rb
  200. 0  vendor/plugins/acts_as_solr/solr/logs/.gitignore → lib/tasks/.gitkeep
  201. 8  lib/tasks/daily.rake
  202. 4  lib/tasks/fixtures.rake
  203. 2  lib/tasks/rails.rake
  204. 16  lib/tasks/rspec.rake
  205. 2  lib/tasks/validate_model.rake
  206. 4  lib/tasks/validate_models.rake
  207. 2  lib/yahoo_geocoder.rb
  208. BIN  public/favicon.ico
  209. BIN  public/images/rails.png
  210. 2  public/javascripts/effects.js
  211. 5,081  public/javascripts/prototype.js
  212. 0  vendor/plugins/acts_as_solr/solr/tmp/.gitignore → public/stylesheets/.gitkeep
  213. 9  public/stylesheets/master.css
  214. 4  spec/models/article_spec.rb
  215. 9  test/performance/browsing_test.rb
  216. 29  test/test_helper.rb
  217. 0  vendor/plugins/.gitkeep
  218. 2  vendor/plugins/acts-as-taggable-on/.gitignore
  219. 18  vendor/plugins/acts-as-taggable-on/CHANGELOG
  220. 20  vendor/plugins/acts-as-taggable-on/MIT-LICENSE
  221. 196  vendor/plugins/acts-as-taggable-on/README
  222. 7  vendor/plugins/acts-as-taggable-on/Rakefile
  223. 42  vendor/plugins/acts-as-taggable-on/acts-as-taggable-on.gemspec
  224. 7  ...ins/acts-as-taggable-on/generators/acts_as_taggable_on_migration/acts_as_taggable_on_migration_generator.rb
  225. 29  vendor/plugins/acts-as-taggable-on/generators/acts_as_taggable_on_migration/templates/migration.rb
  226. 1  vendor/plugins/acts-as-taggable-on/init.rb
  227. 6  vendor/plugins/acts-as-taggable-on/lib/acts-as-taggable-on.rb
  228. 326  vendor/plugins/acts-as-taggable-on/lib/acts_as_taggable_on/acts_as_taggable_on.rb
  229. 52  vendor/plugins/acts-as-taggable-on/lib/acts_as_taggable_on/acts_as_tagger.rb
  230. 23  vendor/plugins/acts-as-taggable-on/lib/acts_as_taggable_on/tag.rb
  231. 93  vendor/plugins/acts-as-taggable-on/lib/acts_as_taggable_on/tag_list.rb
  232. 6  vendor/plugins/acts-as-taggable-on/lib/acts_as_taggable_on/tagging.rb
  233. 11  vendor/plugins/acts-as-taggable-on/lib/acts_as_taggable_on/tags_helper.rb
  234. 6  vendor/plugins/acts-as-taggable-on/rails/init.rb
  235. 165  vendor/plugins/acts-as-taggable-on/spec/acts_as_taggable_on/acts_as_taggable_on_spec.rb
  236. 72  vendor/plugins/acts-as-taggable-on/spec/acts_as_taggable_on/acts_as_tagger_spec.rb
  237. 41  vendor/plugins/acts-as-taggable-on/spec/acts_as_taggable_on/tag_list_spec.rb
  238. 27  vendor/plugins/acts-as-taggable-on/spec/acts_as_taggable_on/tag_spec.rb
  239. 147  vendor/plugins/acts-as-taggable-on/spec/acts_as_taggable_on/taggable_spec.rb
  240. 23  vendor/plugins/acts-as-taggable-on/spec/acts_as_taggable_on/tagger_spec.rb
  241. 7  vendor/plugins/acts-as-taggable-on/spec/acts_as_taggable_on/tagging_spec.rb
  242. 32  vendor/plugins/acts-as-taggable-on/spec/schema.rb
  243. 7  vendor/plugins/acts-as-taggable-on/spec/spec.opts
  244. 46  vendor/plugins/acts-as-taggable-on/spec/spec_helper.rb
  245. 86  vendor/plugins/acts_as_authenticated/CHANGELOG
  246. 22  vendor/plugins/acts_as_authenticated/README
  247. 1  vendor/plugins/acts_as_authenticated/generators/authenticated/USAGE
  248. 102  vendor/plugins/acts_as_authenticated/generators/authenticated/authenticated_generator.rb
  249. 120  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/authenticated_system.rb
  250. 113  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/authenticated_test_helper.rb
  251. 43  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/controller.rb
  252. 17  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/fixtures.yml
  253. 129  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/functional_test.rb
  254. 2  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/helper.rb
  255. 56  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/index.rhtml
  256. 14  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/login.rhtml
  257. 18  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/migration.rb
  258. 64  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/model.rb
  259. 16  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/signup.rhtml
  260. 75  vendor/plugins/acts_as_authenticated/generators/authenticated/templates/unit_test.rb
  261. 1  vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/USAGE
  262. 27  vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/authenticated_mailer_generator.rb
  263. 3  vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/activation.rhtml
  264. 22  vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier.rb
  265. 27  vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier_test.rb
  266. 9  vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/observer.rb
  267. 8  vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/signup_notification.rhtml
  268. 1  vendor/plugins/acts_as_authenticated/install.rb
  269. 19  vendor/plugins/acts_as_solr/CHANGE_LOG
  270. 8  vendor/plugins/acts_as_solr/FORKED_CHANGES
  271. 44  vendor/plugins/acts_as_solr/README
  272. 5  vendor/plugins/acts_as_solr/README.markdown
  273. 70  vendor/plugins/acts_as_solr/Rakefile
  274. 23  vendor/plugins/acts_as_solr/TESTING_THE_PLUGIN
  275. 1  vendor/plugins/acts_as_solr/VERSION
  276. 242  vendor/plugins/acts_as_solr/acts_as_solr.gemspec
  277. 11  vendor/plugins/acts_as_solr/bin/acts_as_solr
  278. 16  vendor/plugins/acts_as_solr/config/environment.rb
  279. 9  vendor/plugins/acts_as_solr/config/solr.yml
  280. 33  vendor/plugins/acts_as_solr/config/solr_environment.rb
  281. 2  vendor/plugins/acts_as_solr/lib/aas_tasks.rb
  282. 6  vendor/plugins/acts_as_solr/lib/acts_as_solr.rb
  283. 142  vendor/plugins/acts_as_solr/lib/acts_methods.rb
  284. 132  vendor/plugins/acts_as_solr/lib/class_methods.rb
  285. 39  vendor/plugins/acts_as_solr/lib/common_methods.rb
  286. 126  vendor/plugins/acts_as_solr/lib/instance_methods.rb
  287. 18  vendor/plugins/acts_as_solr/lib/lazy_document.rb
  288. 195  vendor/plugins/acts_as_solr/lib/parser_methods.rb
  289. 5  vendor/plugins/acts_as_solr/lib/search_results.rb
  290. 33  vendor/plugins/acts_as_solr/lib/solr/connection.rb
  291. 5  vendor/plugins/acts_as_solr/lib/solr/document.rb
  292. 2  vendor/plugins/acts_as_solr/lib/solr/importer/mapper.rb
  293. 2  vendor/plugins/acts_as_solr/lib/solr/importer/solr_source.rb
  294. 2  vendor/plugins/acts_as_solr/lib/solr/request.rb
  295. 2  vendor/plugins/acts_as_solr/lib/solr/request/add_document.rb
  296. 2  vendor/plugins/acts_as_solr/lib/solr/request/base.rb
  297. 2  vendor/plugins/acts_as_solr/lib/solr/request/dismax.rb
  298. 51  vendor/plugins/acts_as_solr/lib/solr/request/modify_document.rb
  299. 8  vendor/plugins/acts_as_solr/lib/solr/request/select.rb
  300. 33  vendor/plugins/acts_as_solr/{solr/solr/conf/synonyms.txt → lib/solr/request/spellcheck.rb}
  301. 312  vendor/plugins/acts_as_solr/lib/solr/request/standard.rb
  302. 5  vendor/plugins/acts_as_solr/lib/solr/response.rb
  303. 2  vendor/plugins/acts_as_solr/lib/solr/response/add_document.rb
  304. 2  vendor/plugins/acts_as_solr/lib/solr/response/index_info.rb
  305. 14  vendor/plugins/acts_as_solr/{solr/solr/conf/protwords.txt → lib/solr/response/modify_document.rb}
6  .rvmrc
... ...
@@ -1,4 +1,6 @@
1 1
 #!/usr/bin/env bash
2 2
 
3  
-rvm --create ree-1.8.7@oc
4  
-rvm use ree-1.8.7@oc
  3
+rvm --create ree-1.8.7@oc-rails3
  4
+rvm ree-1.8.7@oc-rails3
  5
+
  6
+
18  Gemfile
... ...
@@ -1,16 +1,19 @@
1 1
 source 'http://rubygems.org'
2 2
  
3  
-gem 'rails', '3.0.0.rc2'
  3
+gem 'rails', '3.0.4'
4 4
 
5 5
 # database gems -- need both pg and mysql for app and wiki
6 6
 gem 'pg'
7 7
 gem 'mysql'
8 8
 
  9
+gem "settingslogic"
  10
+
9 11
 # HAML support
10 12
 gem "haml"
11 13
 
12 14
 # RMagick
13 15
 gem 'rmagick', '2.13.1'
  16
+gem 'simple_captcha', :git => 'git://github.com/galetahub/simple-captcha.git'
14 17
 
15 18
 # GovKit
16 19
 gem "govkit"
@@ -44,6 +47,17 @@ gem 'newrelic_rpm'
44 47
 # oauth
45 48
 gem 'oauth'
46 49
 
47  
-gem 'will_paginate'
  50
+gem 'will_paginate', '~> 3.0.pre2'
  51
+
  52
+gem "acts_as_solr"
  53
+gem "validates_captcha"
  54
+gem "okkez-open_id_authentication"
  55
+gem "devise"
  56
+
  57
+gem "acts-as-taggable-on", :git => 'http://github.com/mbleigh/acts-as-taggable-on.git'
48 58
 
  59
+group :development do
  60
+  # bundler requires these gems in development
  61
+  # gem "rails-footnotes"
  62
+end
49 63
 
109  Gemfile.lock
... ...
@@ -1,36 +1,49 @@
  1
+GIT
  2
+  remote: git://github.com/galetahub/simple-captcha.git
  3
+  revision: b8493942e9a9bb58c58712fa21d41963330da6aa
  4
+  specs:
  5
+    simple_captcha (0.1.1)
  6
+
  7
+GIT
  8
+  remote: http://github.com/mbleigh/acts-as-taggable-on.git
  9
+  revision: 3d707c25d45b5cc680cf3623d15ff59856457ea9
  10
+  specs:
  11
+    acts-as-taggable-on (2.0.6)
  12
+
1 13
 GEM
2 14
   remote: http://rubygems.org/
3 15
   specs:
4 16
     RedCloth (4.2.7)
5 17
     abstract (1.0.0)
6  
-    actionmailer (3.0.0.rc2)
7  
-      actionpack (= 3.0.0.rc2)
8  
-      mail (~> 2.2.5)
9  
-    actionpack (3.0.0.rc2)
10  
-      activemodel (= 3.0.0.rc2)
11  
-      activesupport (= 3.0.0.rc2)
  18
+    actionmailer (3.0.4)
  19
+      actionpack (= 3.0.4)
  20
+      mail (~> 2.2.15)
  21
+    actionpack (3.0.4)
  22
+      activemodel (= 3.0.4)
  23
+      activesupport (= 3.0.4)
12 24
       builder (~> 2.1.2)
13 25
       erubis (~> 2.6.6)
14  
-      i18n (~> 0.4.1)
  26
+      i18n (~> 0.4)
15 27
       rack (~> 1.2.1)
16  
-      rack-mount (~> 0.6.12)
17  
-      rack-test (~> 0.5.4)
  28
+      rack-mount (~> 0.6.13)
  29
+      rack-test (~> 0.5.7)
18 30
       tzinfo (~> 0.3.23)
19  
-    activemodel (3.0.0.rc2)
20  
-      activesupport (= 3.0.0.rc2)
  31
+    activemodel (3.0.4)
  32
+      activesupport (= 3.0.4)
21 33
       builder (~> 2.1.2)
22  
-      i18n (~> 0.4.1)
23  
-    activerecord (3.0.0.rc2)
24  
-      activemodel (= 3.0.0.rc2)
25  
-      activesupport (= 3.0.0.rc2)
26  
-      arel (~> 1.0.0.rc1)
  34
+      i18n (~> 0.4)
  35
+    activerecord (3.0.4)
  36
+      activemodel (= 3.0.4)
  37
+      activesupport (= 3.0.4)
  38
+      arel (~> 2.0.2)
27 39
       tzinfo (~> 0.3.23)
28  
-    activeresource (3.0.0.rc2)
29  
-      activemodel (= 3.0.0.rc2)
30  
-      activesupport (= 3.0.0.rc2)
31  
-    activesupport (3.0.0.rc2)
32  
-    arel (1.0.1)
33  
-      activesupport (~> 3.0.0)
  40
+    activeresource (3.0.4)
  41
+      activemodel (= 3.0.4)
  42
+      activesupport (= 3.0.4)
  43
+    activesupport (3.0.4)
  44
+    acts_as_solr (1.3.3)
  45
+    arel (2.0.8)
  46
+    bcrypt-ruby (2.1.4)
34 47
     bluecloth (2.0.11)
35 48
     builder (2.1.2)
36 49
     capistrano (2.5.19)
@@ -43,6 +56,9 @@ GEM
43 56
       capistrano (>= 1.0.0)
44 57
     closure-compiler (1.0.0)
45 58
     crack (0.1.8)
  59
+    devise (1.1.7)
  60
+      bcrypt-ruby (~> 2.1.2)
  61
+      warden (~> 1.0.2)
46 62
     erubis (2.6.6)
47 63
       abstract (>= 1.0.0)
48 64
     fastercsv (1.5.4)
@@ -60,7 +76,7 @@ GEM
60 76
     htmlentities (4.2.4)
61 77
     httparty (0.7.4)
62 78
       crack (= 0.1.8)
63  
-    i18n (0.4.2)
  79
+    i18n (0.5.0)
64 80
     jammit (0.6.0)
65 81
       closure-compiler (>= 0.1.0)
66 82
       yui-compressor (>= 0.9.1)
@@ -83,6 +99,8 @@ GEM
83 99
     newrelic_rpm (2.13.4)
84 100
     nokogiri (1.4.4)
85 101
     oauth (0.4.4)
  102
+    okkez-open_id_authentication (1.0.1)
  103
+      ruby-openid (>= 2.0.4)
86 104
     pg (0.10.1)
87 105
     polyglot (0.3.1)
88 106
     rack (1.2.1)
@@ -93,28 +111,34 @@ GEM
93 111
       ruby-openid (>= 2.1.8)
94 112
     rack-test (0.5.7)
95 113
       rack (>= 1.0)
96  
-    rails (3.0.0.rc2)
97  
-      actionmailer (= 3.0.0.rc2)
98  
-      actionpack (= 3.0.0.rc2)
99  
-      activerecord (= 3.0.0.rc2)
100  
-      activeresource (= 3.0.0.rc2)
101  
-      activesupport (= 3.0.0.rc2)
102  
-      bundler (>= 1.0.0.rc.6)
103  
-      railties (= 3.0.0.rc2)
104  
-    railties (3.0.0.rc2)
105  
-      actionpack (= 3.0.0.rc2)
106  
-      activesupport (= 3.0.0.rc2)
107  
-      rake (>= 0.8.3)
108  
-      thor (~> 0.14.0)
  114
+    rails (3.0.4)
  115
+      actionmailer (= 3.0.4)
  116
+      actionpack (= 3.0.4)
  117
+      activerecord (= 3.0.4)
  118
+      activeresource (= 3.0.4)
  119
+      activesupport (= 3.0.4)
  120
+      bundler (~> 1.0)
  121
+      railties (= 3.0.4)
  122
+    railties (3.0.4)
  123
+      actionpack (= 3.0.4)
  124
+      activesupport (= 3.0.4)
  125
+      rake (>= 0.8.7)
  126
+      thor (~> 0.14.4)
109 127
     rake (0.8.7)
110 128
     rmagick (2.13.1)
111 129
     ruby-openid (2.1.8)
  130
+    settingslogic (2.0.6)
112 131
     simple-rss (1.2.3)
113 132
     thor (0.14.6)
114 133
     treetop (1.4.9)
115 134
       polyglot (>= 0.3.1)
116 135
     tzinfo (0.3.24)
117  
-    will_paginate (2.3.15)
  136
+    validates_captcha (0.9.7)
  137
+      actionpack (>= 2.3.2)
  138
+      activerecord (>= 2.3.2)
  139
+    warden (1.0.3)
  140
+      rack (>= 1.0.0)
  141
+    will_paginate (3.0.pre2)
118 142
     yui-compressor (0.9.4)
119 143
 
120 144
 PLATFORMS
@@ -122,9 +146,12 @@ PLATFORMS
122 146
 
123 147
 DEPENDENCIES
124 148
   RedCloth
  149
+  acts-as-taggable-on!
  150
+  acts_as_solr
125 151
   bluecloth
126 152
   capistrano
127 153
   capistrano-ext
  154
+  devise
128 155
   govkit
129 156
   haml
130 157
   hoptoad_notifier
@@ -136,10 +163,14 @@ DEPENDENCIES
136 163
   mysql
137 164
   newrelic_rpm
138 165
   oauth
  166
+  okkez-open_id_authentication
139 167
   pg
140 168
   rack-openid
141  
-  rails (= 3.0.0.rc2)
  169
+  rails (= 3.0.4)
142 170
   rmagick (= 2.13.1)
143 171
   ruby-openid
  172
+  settingslogic
144 173
   simple-rss
145  
-  will_paginate
  174
+  simple_captcha!
  175
+  validates_captcha
  176
+  will_paginate (~> 3.0.pre2)
7  Rakefile
... ...
@@ -1,10 +1,7 @@
1 1
 # Add your own tasks in files placed in lib/tasks ending in .rake,
2 2
 # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 3
 
4  
-require(File.join(File.dirname(__FILE__), 'config', 'boot'))
5  
-
  4
+require File.expand_path('../config/application', __FILE__)
6 5
 require 'rake'
7  
-require 'rake/testtask'
8  
-require 'rake/rdoctask'
9 6
 
10  
-require 'tasks/rails'
  7
+OpenCongress::Application.load_tasks
17  app/controllers/account_controller.rb
... ...
@@ -1,5 +1,5 @@
1 1
 class AccountController < ApplicationController
2  
-  before_filter :login_from_cookie, :except => [:reset_password]
  2
+  #before_filter :login_from_cookie, :except => [:reset_password]
3 3
   before_filter :login_required, :only => [:welcome, :accept_tos]
4 4
   after_filter :check_wiki, :only => [:login, :activate]
5 5
 
@@ -11,7 +11,7 @@ class AccountController < ApplicationController
11 11
 #  observer :user_observer
12 12
 
13 13
   def index
14  
-    unless logged_in?
  14
+    unless user_signed_in?
15 15
       redirect_to(login_path)
16 16
     else
17 17
       redirect_to(user_profile_path(:login => current_user.login))
@@ -51,7 +51,7 @@ def login
51 51
     end
52 52
 
53 53
     if params[:wiki_return_page]
54  
-      session[:return_to] = "#{WIKI_BASE_URL}/#{params[:wiki_return_page]}"
  54
+      session[:return_to] = "#{Settings.wiki_base_url}/#{params[:wiki_return_page]}"
55 55
     end
56 56
 
57 57
     if using_open_id?
@@ -65,7 +65,7 @@ def login
65 65
       return unless request.post?
66 66
     end
67 67
 
68  
-    if logged_in?
  68
+    if user_signed_in?
69 69
       self.current_user.update_attribute(:previous_login_date, self.current_user.last_login ? self.current_user.last_login : Time.now)
70 70
       self.current_user.update_attribute(:last_login, Time.now)
71 71
       ip = self.current_user.user_ip_addresses.find_or_create_by_addr(UserIpAddress.int_form(request.remote_ip))
@@ -142,7 +142,7 @@ def logout
142 142
       session[:return_to] = "http://www.opencongress.org/wiki/#{params[:wiki_return_page]}"
143 143
     end    
144 144
     redirect_loc = session[:return_to]
145  
-    self.current_user.forget_me if logged_in?
  145
+    self.current_user.forget_me if user_signed_in?
146 146
     cookies.delete :auth_token
147 147
     cookies.delete '_session_id'
148 148
     cookies.delete 'ocloggedin'
@@ -178,8 +178,9 @@ def activate
178 178
   def welcome
179 179
     @user = current_user
180 180
     @show_tracked_list = true
181  
-    @most_viewed_bills = ObjectAggregate.popular('Bill', DEFAULT_COUNT_TIME, 5)
182  
-    @senators, @reps = Person.find_current_congresspeople_by_zipcode(@user.zipcode, @user.zip_four) if ( logged_in? && @user == current_user && !(@user.zipcode.nil? || @user.zipcode.empty?))
  181
+
  182
+    @most_viewed_bills = ObjectAggregate.popular('Bill', Settings.default_count_time, 5)
  183
+    @senators, @reps = Person.find_current_congresspeople_by_zipcode(@user.zipcode, @user.zip_four) if ( user_signed_in? && @user == current_user && !(@user.zipcode.nil? || @user.zipcode.empty?))
183 184
   end
184 185
 
185 186
   def forgot_password
@@ -306,7 +307,7 @@ def new_openid
306 307
   end
307 308
   
308 309
   def check_wiki
309  
-    if logged_in? and (RAILS_ENV == 'production')
  310
+    if user_signed_in? and (Rails.env == 'production')
310 311
       begin
311 312
         require 'net/http'
312 313
         require 'uri'
2  app/controllers/admin/stats_controller.rb
@@ -269,7 +269,7 @@ def users
269 269
   
270 270
   def bills
271 271
     @page_title = "Bill Stats"
272  
-    @session = params[:session].blank? ? DEFAULT_CONGRESS : params[:session]
  272
+    @session = params[:session].blank? ? Settings.default_congress : params[:session]
273 273
     if params[:format] == 'csv'
274 274
       @bills = Bill.find(:all, :conditions => ["session = ?", @session], 
275 275
                         :order => 'bills.page_views_count DESC')
23  app/controllers/api_controller.rb
@@ -9,7 +9,7 @@ class ApiController < ApplicationController
9 9
   def index
10 10
     @page_title = "OC API Documentation"
11 11
     @api_key = ""
12  
-    if logged_in?
  12
+    if user_signed_in?
13 13
       @api_key = current_user.feed_key
14 14
     end
15 15
     
@@ -68,25 +68,25 @@ def people
68 68
 
69 69
           
70 70
   end
71  
-#  Person.find_by_most_commentary(type = 'news', person_type = 'rep', num = 5, since = DEFAULT_COUNT_TIME)
  71
+#  Person.find_by_most_commentary(type = 'news', person_type = 'rep', num = 5, since = Settings.default_count_time)
72 72
 
73 73
   def most_blogged_representatives_this_week
74  
-    people = Person.find_by_most_commentary('blog', 'rep', @per_page, DEFAULT_COUNT_TIME)
  74
+    people = Person.find_by_most_commentary('blog', 'rep', @per_page, Settings.default_count_time)
75 75
     do_render(people, {:methods => [:oc_user_comments, :oc_users_tracking], :include => [:recent_news, :recent_blogs]})
76 76
   end
77 77
 
78 78
   def most_blogged_senators_this_week
79  
-    people = Person.find_by_most_commentary('blog', 'sen', @per_page, DEFAULT_COUNT_TIME)
  79
+    people = Person.find_by_most_commentary('blog', 'sen', @per_page, Settings.default_count_time)
80 80
     do_render(people, {:methods => [:oc_user_comments, :oc_users_tracking], :include => [:recent_news, :recent_blogs]})
81 81
   end
82 82
 
83 83
   def representatives_most_in_the_news_this_week
84  
-    people = Person.find_by_most_commentary('news', 'rep', @per_page, DEFAULT_COUNT_TIME)
  84
+    people = Person.find_by_most_commentary('news', 'rep', @per_page, Settings.default_count_time)
85 85
     do_render(people, {:methods => [:oc_user_comments, :oc_users_tracking], :include => [:recent_news, :recent_blogs]})
86 86
   end
87 87
 
88 88
   def senators_most_in_the_news_this_week
89  
-    people = Person.find_by_most_commentary('news', 'sen', @per_page, DEFAULT_COUNT_TIME)
  89
+    people = Person.find_by_most_commentary('news', 'sen', @per_page, Settings.default_count_time)
90 90
     do_render(people, {:methods => [:oc_user_comments, :oc_users_tracking], :include => [:recent_news, :recent_blogs]})
91 91
   end
92 92
 
@@ -238,7 +238,7 @@ def bills_introduced_since
238 238
   
239 239
   def bills_by_query
240 240
     query_stripped = prepare_tsearch_query(params[:q])
241  
-    bills = Bill.full_text_search(query_stripped, {:congresses => [DEFAULT_CONGRESS,DEFAULT_CONGRESS - 1,DEFAULT_CONGRESS - 2,DEFAULT_CONGRESS - 3], :page => 1})
  241
+    bills = Bill.full_text_search(query_stripped, {:congresses => [Settings.default_congress,Settings.default_congress - 1,Settings.default_congress - 2,Settings.default_congress - 3], :page => 1})
242 242
     do_render(bills, {:except => [:rolls, :hot_bill_category_id], 
243 243
                                 :methods => [:title_full_common, :status], 
244 244
                                 :include => {:co_sponsors => {:methods => [:oc_user_comments, :oc_users_tracking]}, 
@@ -255,24 +255,25 @@ def hot_bills
255 255
   
256 256
   def stalled_bills
257 257
     original_chamber = (params[:passing_chamber] == 's') ? 's' : 'h'
258  
-    session = (AVAILABLE_CONGRESSES.include?(params[:session])) ? params[:session] : DEFAULT_CONGRESS
  258
+    session = (AVAILABLE_CONGRESSES.include?(params[:session])) ? params[:session] : Settings.default_congress
259 259
     
260 260
     bills = Bill.find_stalled_in_second_chamber(original_chamber, session)
261 261
     do_render(bills, {:except => [:rolls, :hot_bill_category_id]})
262 262
   end
263 263
   
264 264
   def most_blogged_bills_this_week
265  
-    bills = Bill.find_by_most_commentary('blog', 10, DEFAULT_COUNT_TIME)
  265
+    bills = Bill.find_by_most_commentary('blog', 10, Settings.default_count_time)
266 266
     do_render(bills, {:except => [:rolls, :hot_bill_category_id]})
267 267
   end
268 268
   
269 269
   def bills_in_the_news_this_week
270  
-    bills = Bill.find_by_most_commentary('news', 10, DEFAULT_COUNT_TIME)
  270
+    bills = Bill.find_by_most_commentary('news', 10, Settings.default_count_time)
271 271
     do_render(bills, {:except => [:rolls, :hot_bill_category_id]})
272 272
   end
273 273
   
274 274
   def most_viewed_bills_this_week
275  
-    bills = ObjectAggregate.popular('Bill', DEFAULT_COUNT_TIME + 30.days, 10) || Bill.find(:first)
  275
+    bills = ObjectAggregate.popular('Bill', Settings.default_count_time + 30.days, 10) || Bill.find(:first)
  276
+
276 277
     do_render(bills, {:except => [:rolls, :hot_bill_category_id]})
277 278
   end
278 279
   
33  app/controllers/application_controller.rb
... ...
@@ -1,7 +1,7 @@
1  
-# Filters added to this controller will be run for all controllers in the application.
2  
-# Likewise, all the methods added will be available for all controllers.
3 1
 class ApplicationController < ActionController::Base
4  
-  include AuthenticatedSystem
  2
+  protect_from_forgery
  3
+  
  4
+  #include AuthenticatedSystem
5 5
   include SimpleCaptcha::ControllerHelpers
6 6
 
7 7
   before_filter :store_location, :except => ["rescue_action_in_public"]
@@ -29,7 +29,7 @@ def paginate_collection(collection, options = {})
29 29
   # this is only used for search results
30 30
   # CLEANUP TASK: combine this and the above pagintor
31 31
   def pages_for(size, options = {})
32  
-    default_options = {:per_page => DEFAULT_SEARCH_PAGE_SIZE }
  32
+    default_options = {:per_page => Settings.default_search_page_size }
33 33
     options = default_options.merge options
34 34
     pages = Paginator.new self, size, options[:per_page], (params[:page]||1)
35 35
     pages
@@ -51,7 +51,7 @@ def is_valid_email?(e, with_headers = false)
51 51
 
52 52
   def days_from_params(days)
53 53
     days = days.to_i if (days && !days.kind_of?(Integer))
54  
-    return (days && ((days == 7) || (days == 14) || (days == 30) || (days == 365))) ? days.days : DEFAULT_COUNT_TIME
  54
+    return (days && ((days == 7) || (days == 14) || (days == 30) || (days == 365))) ? days.days : Settings.default_count_time
55 55
   end
56 56
 
57 57
   def rescue_action_in_public(exception)
@@ -77,7 +77,8 @@ def comment_redirect(comment_id)
77 77
   private
78 78
 
79 79
   def has_accepted_tos?
80  
-    if logged_in?
  80
+    if user_signed_in?
  81
+      logger.info "USER APP TOS: #{current_user.accepted_tos}"
81 82
       unless current_user.accepted_tos == true
82 83
         redirect_to :controller => 'account', :action => 'accept_tos'
83 84
       end
@@ -85,7 +86,7 @@ def has_accepted_tos?
85 86
   end
86 87
 
87 88
   def is_banned?
88  
-    if logged_in?
  89
+    if user_signed_in?
89 90
       if current_user.is_banned == true
90 91
         redirect_to logout_url
91 92
       end
@@ -101,32 +102,32 @@ def show_comments?
101 102
       end
102 103
   end
103 104
   def admin_login_required
104  
-    if !(logged_in? && current_user.user_role.can_administer_users)
  105
+    if !(user_signed_in? && current_user.user_role.can_administer_users)
105 106
       redirect_to :controller => 'admin', :action => 'index'
106 107
     end
107 108
   end
108 109
   def can_text
109  
-    if !(logged_in? && current_user.user_role.can_manage_text)
  110
+    if !(user_signed_in? && current_user.user_role.can_manage_text)
110 111
       redirect_to :controller => 'admin', :action => 'index'
111 112
     end
112 113
   end
113 114
   def can_moderate
114  
-    if !(logged_in? && current_user.user_role.can_moderate_articles)
  115
+    if !(user_signed_in? && current_user.user_role.can_moderate_articles)
115 116
       redirect_to :controller => 'admin', :action => 'index'
116 117
     end
117 118
   end
118 119
   def can_blog
119  
-    unless (logged_in? && current_user.user_role.can_blog)
  120
+    unless (user_signed_in? && current_user.user_role.can_blog)
120 121
       redirect_to :controller => 'admin', :action => 'index'
121 122
     end
122 123
   end
123 124
   def can_stats
124  
-    unless (logged_in? && current_user.user_role.can_see_stats)
  125
+    unless (user_signed_in? && current_user.user_role.can_see_stats)
125 126
       redirect_to :controller => 'admin', :action => 'index'
126 127
     end
127 128
   end
128 129
   def no_users
129  
-    unless (logged_in? && current_user.user_role.name != "User")
  130
+    unless (user_signed_in? && current_user.user_role.name != "User")
130 131
       flash[:notice] = "Permission Denied"
131 132
       redirect_to login_url
132 133
     end
@@ -157,6 +158,12 @@ def get_site_text_page
157 158
     @site_text_page = SiteTextPage.find_by_page_params(page_params)
158 159
     @site_text_page = OpenStruct.new if @site_text_page.nil?
159 160
   end
  161
+  
  162
+  def store_location
  163
+    unless request.fullpath =~ /^\/stylesheets/ || request.fullpath =~ /^\/images/ || request.xhr?
  164
+      session[:return_to] = request.fullpath
  165
+    end
  166
+  end
160 167
 
161 168
   protected
162 169
   def dump_session
2  app/controllers/articles_controller.rb
@@ -19,7 +19,7 @@ def show
19 19
     
20 20
     def list
21 21
       if params[:tag] && @tag = CGI.unescape(params[:tag])
22  
-        @articles = Article.find_tagged_with(@tag).paginate(:page => params[:page], :per_page => 15)
  22
+        @articles = Article.tagged_with(@tag, :any => true).paginate(:page => params[:page], :per_page => 15)
23 23
         @page_title = "Blog - Articles Tagged '#{@tag}'"
24 24
       elsif @month = params[:month]
25 25
         month, year = @month.split(/-/)
8  app/controllers/battle_royale_controller.rb
@@ -27,7 +27,7 @@ def index
27 27
     end
28 28
     page = params[:page] ||= 1
29 29
     
30  
-#    @cache_key = "br-bill-#{page}-#{sort}-#{order}-#{logged_in? ? current_user.login : nil}-#{@range}-#{params[:q].blank? ? nil : Digest::SHA1.hexdigest(params[:q])}"
  30
+#    @cache_key = "br-bill-#{page}-#{sort}-#{order}-#{user_signed_in? ? current_user.login : nil}-#{@range}-#{params[:q].blank? ? nil : Digest::SHA1.hexdigest(params[:q])}"
31 31
 #    unless read_fragment(@cache_key)
32 32
       unless params[:q].blank?
33 33
         @r_count = Bill.count_all_by_most_user_votes_for_range(@range, :search => prepare_tsearch_query(params[:q]), :order => sort + " " + order, :per_page => 20, :page => page)
@@ -77,7 +77,7 @@ def senators
77 77
     end
78 78
     
79 79
     page = params[:page] ||= 1
80  
-#    @cache_key = "br-sens-#{page}-#{sort}-#{order}-#{logged_in? ? current_user.login : nil}-#{@range}-#{params[:q].blank? ? nil : Digest::SHA1.hexdigest(params[:q])}"
  80
+#    @cache_key = "br-sens-#{page}-#{sort}-#{order}-#{user_signed_in? ? current_user.login : nil}-#{@range}-#{params[:q].blank? ? nil : Digest::SHA1.hexdigest(params[:q])}"
81 81
 #    unless read_fragment(@cache_key)    
82 82
       unless params[:q].blank?    
83 83
         @r_count = Person.count_all_by_most_tracked_for_range(@range, :search => prepare_tsearch_query(params[:q]), :order => sort + " " + order, :per_page => 20, :page => page)
@@ -126,7 +126,7 @@ def representatives
126 126
         @p_subtitle << "Comments"
127 127
     end
128 128
     page = params[:page] ||= 1
129  
-#    @cache_key = "br-reps-#{page}-#{sort}-#{order}-#{logged_in? ? current_user.login : nil}-#{@range}-#{params[:q].blank? ? nil : Digest::SHA1.hexdigest(params[:q])}"
  129
+#    @cache_key = "br-reps-#{page}-#{sort}-#{order}-#{user_signed_in? ? current_user.login : nil}-#{@range}-#{params[:q].blank? ? nil : Digest::SHA1.hexdigest(params[:q])}"
130 130
 #    unless read_fragment(@cache_key)
131 131
       unless params[:q].blank?    
132 132
         @r_count = Person.count_all_by_most_tracked_for_range(@range, :search => prepare_tsearch_query(params[:q]), :order => sort + " " + order, :per_page => 20, :page => page, :person_type => "Rep.")
@@ -171,7 +171,7 @@ def issues
171 171
         @p_subtitle << "Comments"
172 172
     end
173 173
     page = params[:page] ||= 1
174  
-#    @cache_key = "br-issues-#{page}-#{sort}-#{order}-#{logged_in? ? current_user.login : nil}-#{@range}-#{params[:q].blank? ? nil : Digest::SHA1.hexdigest(params[:q])}"
  174
+#    @cache_key = "br-issues-#{page}-#{sort}-#{order}-#{user_signed_in? ? current_user.login : nil}-#{@range}-#{params[:q].blank? ? nil : Digest::SHA1.hexdigest(params[:q])}"
175 175
 #    unless read_fragment(@cache_key)
176 176
       unless params[:q].blank?   
177 177
         @r_count = Subject.count_all_by_most_tracked_for_range(@range, :search => prepare_tsearch_query(params[:q]), :order => sort + " " + order, :per_page => 20, :page => page)
44  app/controllers/bill_controller.rb
@@ -54,7 +54,7 @@ def index
54 54
   def all
55 55
     # disabled caching for 
56 56
     #expires_in 20.minutes, :public => true
57  
-    @congress = params[:congress] ? params[:congress] : DEFAULT_CONGRESS
  57
+    @congress = params[:congress] ? params[:congress] : Settings.default_congress
58 58
     
59 59
     # the following is temporary until a better way is figured out!
60 60
     unless read_fragment("bill_#{@types}_index_#{@congress}")
@@ -69,7 +69,7 @@ def all
69 69
     @page_title = "#{@types.capitalize} Bills: #{@congress}th Congress"
70 70
     @title_desc = SiteText.find_title_desc('bill_all')
71 71
     @sort = 'all'
72  
-    #@related_bills = ObjectAggregate.popular('Bill', DEFAULT_COUNT_TIME, 5) unless @custom_sidebar
  72
+
73 73
     respond_to do |format|
74 74
       format.html {}
75 75
       format.js { render :action => 'update'}
@@ -78,8 +78,8 @@ def all
78 78
 
79 79
   def popular
80 80
     @days = days_from_params(params[:days])
81  
-    @congress = params[:congress].blank? ? DEFAULT_CONGRESS : params[:congress]
82  
-    if @congress != DEFAULT_CONGRESS
  81
+    @congress = params[:congress].blank? ? Settings.default_congress : params[:congress]
  82
+    if @congress != Settings.default_congress
83 83
       @bills = Bill.find(:all, :select => "bills.*, bills.page_views_count AS view_count", 
84 84
                          :conditions => ["session = ?", params[:congress]], 
85 85
                          :order => 'page_views_count DESC', :limit => 100)
@@ -101,7 +101,7 @@ def popular
101 101
 
102 102
   def pending
103 103
     @bills = Bill.find(:all, :include => [:bill_titles, :actions], 
104  
-                        :conditions => ["actions.datetime > ? AND bills.session = ? AND bills.bill_type IN (?)", 3.months.ago, DEFAULT_CONGRESS, @types_from_params], 
  104
+                        :conditions => ["actions.datetime > ? AND bills.session = ? AND bills.bill_type IN (?)", 3.months.ago, Settings.default_congress, @types_from_params], 
105 105
                         :order => "actions.date DESC", :limit => 30)
106 106
                         
107 107
     @page_title = 'Pending Bills in Congress'
@@ -121,7 +121,7 @@ def hot
121 121
     @types = 'all'
122 122
     @hot_bill_categories = PvsCategory.find(:all, :order => :name)
123 123
     @atom = {'link' => "/bill/hot.rss", 'title' => "Hot Bills"}
124  
-    @congress = params[:congress].blank? ? DEFAULT_CONGRESS : params[:congress]
  124
+    @congress = params[:congress].blank? ? Settings.default_congress : params[:congress]
125 125
     
126 126
     respond_to do |format|
127 127
       format.html {}
@@ -135,12 +135,12 @@ def hot
135 135
   end
136 136
 
137 137
   def list_bill_type
138  
-    congress = params[:congress] ? params[:congress] : DEFAULT_CONGRESS
  138
+    congress = params[:congress] ? params[:congress] : Settings.default_congress
139 139
     @page = params[:page]
140 140
     @page = "1" unless @page
141 141
     @bill_type = params[:bill_type]
142 142
 
143  
-    @bills = Bill.paginate_all_by_bill_type_and_session(@bill_type, congress, :include => "bill_titles", :order => 'number', :page => @page)
  143
+    @bills = Bill.where(["bills.bill_type=? AND bills.session=?", @bill_type, congress]).includes(:bill_titles).order('number').paginate(:page => @page)
144 144
 
145 145
     respond_to do |format|
146 146
       format.html {}
@@ -150,7 +150,7 @@ def list_bill_type
150 150
 
151 151
   def most_commentary
152 152
     @days = days_from_params(params[:days])
153  
-    @congress = params[:congress].blank? ? DEFAULT_CONGRESS : params[:congress]
  153
+    @congress = params[:congress].blank? ? Settings.default_congress : params[:congress]
154 154
     
155 155
     if params[:type] == 'news'
156 156
       @sort = @commentary_type = 'news'
@@ -162,14 +162,14 @@ def most_commentary
162 162
       @atom = {'link' => "/bill/atom/most/blog", 'title' => @page_title}
163 163
     end
164 164
     
165  
-    if @congress != DEFAULT_CONGRESS
  165
+    if @congress != Setting.default_congress
166 166
       order = (@sort == 'news') ? 'news_article_count' : 'blog_article_count'
167 167
       @bills = Bill.find(:all, :select => "bills.*, bills.#{order} AS article_count", 
168 168
                          :conditions => ["session = ? AND #{order} IS NOT NULL", params[:congress]], 
169 169
                          :order => "#{order} DESC", :limit => 100)
170 170
     else
171 171
       unless read_fragment("bill_meta_most_#{@commentary_type}_#{@days}")
172  
-        @bills = Bill.find_by_most_commentary(@commentary_type, 20, @days, DEFAULT_CONGRESS, @types_from_params)
  172
+        @bills = Bill.find_by_most_commentary(@commentary_type, 20, @days, Settings.default_congress, @types_from_params)
173 173
       end
174 174
     end
175 175
     respond_to do |format|
@@ -196,19 +196,19 @@ def readthebill
196 196
     case params[:sort]
197 197
     when 'rushed'
198 198
       @page_title = "Read the Bill - Bills Rushed to Vote"
199  
-      @bills = Bill.find_rushed_bills(DEFAULT_CONGRESS, 72.hours.to_i, @show_resolutions).paginate :page => params[:page]
  199
+      @bills = Bill.find_rushed_bills(Settings.default_congress, 72.hours.to_i, @show_resolutions).paginate :page => params[:page]
200 200
       @atom = {'link' => "/bill/readthebill.rss?show_resolutions=#{@show_resolutions}", 'title' => @page_title}
201 201
       @title_desc = SiteText.find_title_desc('bills_rushed')
202 202
       @sort = 'rushed'
203 203
     when 'rtb_all'
204 204
       @page_title = "Read the Bill - All Bills With Vote on Passage"
205  
-      @bills = Bill.find_rushed_bills(DEFAULT_CONGRESS, 2.years.to_i, @show_resolutions).paginate :page => params[:page]
  205
+      @bills = Bill.find_rushed_bills(Settings.default_congress, 2.years.to_i, @show_resolutions).paginate :page => params[:page]
206 206
       @atom = {'link' => "/bill/readthebill.rss?sort=rtb_all&show_resolutions=#{@show_resolutions}", 'title' => @page_title} 
207 207
       @title_desc = SiteText.find_title_desc('bills_rushed_all')
208 208
       @sort = 'rtb_all'
209 209
     else
210 210
       @page_title = "Read the Bill - GPO Text Available to Consideration"
211  
-      @bills = Bill.find_gpo_consideration_rushed_bills(DEFAULT_CONGRESS, 2.years.to_i, @show_resolutions).paginate :page => params[:page]
  211
+      @bills = Bill.find_gpo_consideration_rushed_bills(Settings.default_congress, 2.years.to_i, @show_resolutions).paginate :page => params[:page]
212 212
       @atom = {'link' => "/bill/readthebill.rss?sort=gpo&show_resolutions=#{@show_resolutions}", 'title' => @page_title} 
213 213
       @title_desc = SiteText.find_title_desc('bills_rushed_gpo')
214 214
       @sort = 'gpo'      
@@ -371,7 +371,7 @@ def text
371 371
 
372 372
     begin
373 373
       # open html from file
374  
-      path = "#{OC_BILLTEXT_PATH}/#{@bill.session}/#{@bill.bill_type}#{@bill.number}#{@version.version}.gen.html-oc"
  374
+      path = "#{Settings.oc_billtext_path}/#{@bill.session}/#{@bill.bill_type}#{@bill.number}#{@version.version}.gen.html-oc"
375 375
       
376 376
       @bill_text = File.open(path).read
377 377
     rescue 
@@ -384,7 +384,7 @@ def print_text
384 384
     @bill_text = ""
385 385
     version = @bill.bill_text_versions.find(:first, :conditions => ["bill_text_versions.version=?", params[:version]])
386 386
     if version
387  
-      path = "#{OC_BILLTEXT_PATH}/#{@bill.session}/#{@bill.bill_type}#{@bill.number}#{version.version}.gen.html-oc"
  387
+      path = "#{Settings.oc_billtext_path}/#{@bill.session}/#{@bill.bill_type}#{@bill.number}#{version.version}.gen.html-oc"
388 388
       @bill_text = File.open(path).read
389 389
     end
390 390
     
@@ -576,7 +576,7 @@ def videos
576 576
 
577 577
   def bill_vote
578 578
     @bill = Bill.find_by_ident(params[:bill])
579  
-    if logged_in?
  579
+    if user_signed_in?
580 580
       @bv = current_user.bill_votes.find_by_bill_id(@bill.id)
581 581
       unless @bv
582 582
         @bv = current_user.bill_votes.create({:bill_id => @bill.id, :user_id  => current_user.id, :support => (params[:id] == "1" ? 1 : 0) }) unless @bv
@@ -652,8 +652,8 @@ def bill_profile_shared
652 652
 
653 653
       if @bill.has_wiki_link?
654 654
         @wiki_url = @bill.wiki_url
655  
-      elsif logged_in?
656  
-        @wiki_create_url = "#{WIKI_BASE_URL}/Special:AddData/Bill?Bill[common_title]=#{CGI::escape(@bill.title_common[0..70])}&Bill[bill_type]=#{@bill.bill_type}&Bill[type_name]=#{@bill.type_name}&Bill[bill_number]=#{@bill.number}&Bill[congress]=#{DEFAULT_CONGRESS}" #prolly should be rewritten as a post handled by a custom sfEditFormPreloadText call?
  655
+      elsif user_signed_in?
  656
+        @wiki_create_url = "#{Settings.wiki_base_url}/Special:AddData/Bill?Bill[common_title]=#{CGI::escape(@bill.title_common[0..70])}&Bill[bill_type]=#{@bill.bill_type}&Bill[type_name]=#{@bill.type_name}&Bill[bill_number]=#{@bill.number}&Bill[congress]=#{Settings.default_congress}" #prolly should be rewritten as a post handled by a custom sfEditFormPreloadText call?
657 657
       end
658 658
 
659 659
       @tabs = [
@@ -663,9 +663,9 @@ def bill_profile_shared
663 663
       @tabs << ["Money Trail",{:action => 'money', :id => @bill.ident}] unless @bill.bill_interest_groups.empty?
664 664
       @tabs.concat([
665 665
         ["Wiki","#{@wiki_url}"],
666  
-        ["News <span>(#{number_with_delimiter(@bill.news_article_count)})</span> & Blogs <span>(#{number_with_delimiter(@bill.blog_article_count)})</span>",{:action => 'news_blogs', :id => @bill.ident}],
667  
-        ["Videos <span>(#{number_with_delimiter(@bill.videos.size)})</span>",{:action => 'videos', :id => @bill.ident}],
668  
-        ["Comments <span>(#{number_with_delimiter(@comments.comments.size)})</span>",{:action => 'comments', :id => @bill.ident}]
  666
+        ["News <span>(#{number_with_delimiter(@bill.news_article_count)})</span> & Blogs <span>(#{number_with_delimiter(@bill.blog_article_count)})</span>".html_safe,{:action => 'news_blogs', :id => @bill.ident}],
  667
+        ["Videos <span>(#{number_with_delimiter(@bill.videos.size)})</span>".html_safe,{:action => 'videos', :id => @bill.ident}],
  668
+        ["Comments <span>(#{number_with_delimiter(@comments.comments.size)})</span>".html_safe,{:action => 'comments', :id => @bill.ident}]
669 669
       ])
670 670
       @top_comments = @bill.comments.find(:all,:include => [:user], :order => "comments.plus_score_count - comments.minus_score_count DESC", :limit => 2)
671 671
       @bookmarking_image = "/images/fb-bill.jpg"
2  app/controllers/commentary_controller.rb
@@ -2,7 +2,7 @@ class CommentaryController < ApplicationController
2 2
   skip_before_filter :store_location, :only => [:rate]
3 3
 
4 4
   def rate
5  
-    unless current_user == :false
  5
+    unless user_signed_in? == false
6 6
       commentary = Commentary.find_by_id(params[:id])
7 7
       score = current_user.commentary_ratings.find_or_initialize_by_commentary_id(commentary.id)
8 8
       score.rating = params[:value]
4  app/controllers/comments_controller.rb
@@ -11,7 +11,7 @@ def add_comment
11 11
       @comment.commentable_id = object.id
12 12
       @comment.commentable_type = object.class.to_s
13 13
 
14  
-      @comment.user_id = current_user.id if logged_in?
  14
+      @comment.user_id = current_user.id if user_signed_in?
15 15
       @comment.ip_address = request.remote_ip
16 16
 
17 17
       parent = nil
@@ -27,7 +27,7 @@ def add_comment
27 27
         return
28 28
       end 
29 29
 
30  
-      if logged_in? 
  30
+      if user_signed_in? 
31 31
         unless @comment.save
32 32
           flash[:error] = "Failed to save."
33 33
           if parent
4  app/controllers/committee_controller.rb
@@ -7,7 +7,7 @@ def index
7 7
     @house_committees = Committee.by_chamber('house').sort_by { |c| [c.name, (c.subcommittee_name || "")] }.group_by(&:name)
8 8
     @senate_committees = Committee.by_chamber('senate').sort_by { |c| [c.name, (c.subcommittee_name || "")] }.group_by(&:name)
9 9
 
10  
-    @carousel = ObjectAggregate.popular('Committee', DEFAULT_COUNT_TIME).slice(0..7)
  10
+    @carousel = ObjectAggregate.popular('Committee', Settings.default_count_time).slice(0..7)
11 11
     
12 12
     @page_title =  "Committees"
13 13
     @title_class = "sort"
@@ -54,7 +54,7 @@ def by_chamber
54 54
     @committees = Committee.by_chamber(@chamber).sort_by { |c| [c.name, (c.subcommittee_name || "")] }.group_by(&:name)
55 55
     @major = @committees.keys.sort
56 56
     
57  
-    @related_committees = ObjectAggregate.popular('Committee', DEFAULT_COUNT_TIME).slice(0..2) unless @custom_sidebar 
  57
+    @related_committees = ObjectAggregate.popular('Committee', Settings.default_count_time).slice(0..2) unless @custom_sidebar 
58 58
     
59 59
     @title_class = "sort"
60 60
     @title_desc = SiteText.find_title_desc('committee_index')
5  app/controllers/facebook_controller.rb
@@ -25,7 +25,7 @@ def bill_search
25 25
     unless params[:facebook][:bill_search].blank?
26 26
       search_text = prepare_tsearch_query(params[:facebook][:bill_search])
27 27
       
28  
-      @bills = Bill.full_text_search(search_text, { :page => 1, :congresses => ["#{DEFAULT_CONGRESS}"]})
  28
+      @bills = Bill.full_text_search(search_text, { :page => 1, :congresses => ["#{Settings.default_congress}"]})
29 29
     end
30 30
     
31 31
     render :partial => 'bill_search_results', :layout => false
@@ -40,7 +40,8 @@ def hotbills
40 40
   end
41 41
   
42 42
   def mostviewedbills
43  
-    @bills = ObjectAggregate.popular('Bill', DEFAULT_COUNT_TIME, 25)
  43
+    @bills = ObjectAggregate.popular('Bill', Settings.default_count_time, 25)
  44
+
44 45
     @bill_count = 25
45 46
     
46 47
     respond_to do |format|
16  app/controllers/friends_controller.rb
@@ -37,7 +37,7 @@ def tracking_bill
37 37
    		  @in_my_state_solr = User.find_users_in_states_tracking([params[:state]], @bill, 1000)
38 38
   		  @in_my_state = User.find_for_tracking_table(current_user, @bill, @in_my_state_solr.docs)
39 39
       end
40  
-    elsif logged_in? && !current_user.zipcode.blank?
  40
+    elsif user_signed_in? && !current_user.zipcode.blank?
41 41
 		  @state_abbrev = current_user.state_cache.first  
42 42
       @state_name = State.for_abbrev(@state_abbrev)
43 43
 		  @in_my_state_solr = User.find_users_in_states_tracking(current_user.state_cache, @bill, 1000)
@@ -54,7 +54,7 @@ def tracking_person
54 54
     @users = @users_solr.nil? ? [] : User.find_for_tracking_table(current_user, @person, @users_solr.docs)
55 55
  		@page_title = "Users tracking #{@person.short_name}"
56 56
 
57  
-		if logged_in? && !current_user.zipcode.blank?
  57
+		if user_signed_in? && !current_user.zipcode.blank?
58 58
 		  @in_my_state_solr = User.find_users_in_states_tracking(current_user.state_cache, @person, 1000)
59 59
 		  @in_my_state = User.find_for_tracking_table(current_user, @person, @in_my_state_solr.docs)
60 60
 		  @in_my_district_solr = User.find_users_in_districts_tracking(current_user.district_cache, @person, 1000)
@@ -68,7 +68,7 @@ def tracking_issue
68 68
     @users = @users_solr.nil? ? [] : User.find_for_tracking_table(current_user, @issue, @users_solr.docs)
69 69
  		@page_title = "Users tracking #{@issue.term}"
70 70
 
71  
-		if logged_in? && !current_user.zipcode.blank?
  71
+		if user_signed_in? && !current_user.zipcode.blank?
72 72
 		  @in_my_state_solr = User.find_users_in_states_tracking(current_user.my_state, @issue, 1000)
73 73
 		  @in_my_state = User.find_for_tracking_table(current_user, @issue, @in_my_state_solr.docs)
74 74
 		  @in_my_district_solr = User.find_users_in_districts_tracking(current_user.my_district, @issue, 1000)
@@ -83,7 +83,7 @@ def tracking_committee
83 83
     @users = @users_solr.nil? ? [] : User.find_for_tracking_table(current_user, @committee, @users_solr.docs)
84 84
  		@page_title = "Users tracking the #{@committee.name} Committee"
85 85
 
86  
-		if logged_in? && !current_user.zipcode.blank?
  86
+		if user_signed_in? && !current_user.zipcode.blank?
87 87
 		  @in_my_state_solr = User.find_users_in_states_tracking(current_user.my_state, @committee, 1000)
88 88
 		  @in_my_state = User.find_for_tracking_table(current_user, @committee, @in_my_state_solr.docs)
89 89
 		  @in_my_district_solr = User.find_users_in_districts_tracking(current_user.my_district, @committee, 1000)
@@ -99,7 +99,7 @@ def supporting_person
99 99
     @users = @users_solr.nil? ? [] : User.find_for_tracking_table(current_user, @person, @users_solr.docs)
100 100
  		@page_title = "Users Supporting #{@person.short_name}"
101 101
 
102  
-		if logged_in? && !current_user.zipcode.blank?
  102
+		if user_signed_in? && !current_user.zipcode.blank?
103 103
 		  @in_my_state_solr = User.find_users_in_states_supporting(current_user.state_cache, @person, 1000)
104 104
 		  @in_my_state = User.find_for_tracking_table(current_user, @person, @in_my_state_solr.docs)
105 105
 		  @in_my_district_solr = User.find_users_in_districts_supporting(current_user.district_cache, @person, 1000)
@@ -116,7 +116,7 @@ def opposing_person
116 116
     @users = @users_solr.nil? ? [] : User.find_for_tracking_table(current_user, @person, @users_solr.docs)
117 117
  		@page_title = "Users Opposing #{@person.short_name}"
118 118
 
119  
-		if logged_in? && !current_user.zipcode.blank?
  119
+		if user_signed_in? && !current_user.zipcode.blank?
120 120
 		  @in_my_state_solr = User.find_users_in_states_opposing(current_user.state_cache, @person, 1000)
121 121
 		  @in_my_state = User.find_for_tracking_table(current_user, @person, @in_my_state_solr.docs)
122 122
 		  @in_my_district_solr = User.find_users_in_districts_opposing(current_user.district_cache, @person, 1000)
@@ -131,7 +131,7 @@ def supporting_bill
131 131
     @users = @users_solr.nil? ? [] : User.find_for_tracking_table(current_user, @bill, @users_solr.docs)
132 132
  		@page_title = "Users Supporting #{@bill.typenumber}"
133 133
 
134  
-		if logged_in? && !current_user.zipcode.blank?
  134
+		if user_signed_in? && !current_user.zipcode.blank?
135 135
 		  @in_my_state_solr = User.find_users_in_states_supporting(current_user.state_cache, @bill, 1000)
136 136
 		  @in_my_state = User.find_for_tracking_table(current_user, @bill, @in_my_state_solr.docs)
137 137
 		  @in_my_district_solr = User.find_users_in_districts_supporting(current_user.district_cache, @bill, 1000)
@@ -146,7 +146,7 @@ def opposing_bill
146 146
     @users = @users_solr.nil? ? [] : User.find_for_tracking_table(current_user, @bill, @users_solr.docs)
147 147
  		@page_title = "Users Opposing #{@bill.typenumber}"
148 148
 
149  
-		if logged_in? && !current_user.zipcode.blank?
  149
+		if user_signed_in? && !current_user.zipcode.blank?
150 150
 		  @in_my_state_solr = User.find_users_in_states_opposing(current_user.state_cache, @bill, 1000)
151 151
 		  @in_my_state = User.find_for_tracking_table(current_user, @bill, @in_my_state_solr.docs)
152 152
 		  @in_my_district_solr = User.find_users_in_districts_opposing(current_user.district_cache, @bill, 1000)
2  app/controllers/gossip_controller.rb
@@ -74,7 +74,7 @@ def atom
74 74
   end
75 75
   private
76 76
   def can_gossip
77  
-    if !(logged_in? && current_user.user_role.can_manage_text)
  77
+    if !(user_signed_in? && current_user.user_role.can_manage_text)
78 78
       redirect_to :controller => 'gossip', :action => 'index'
79 79
     end
80 80
   end
12  app/controllers/index_controller.rb
@@ -6,13 +6,13 @@ def index
6 6
       @index_tabs = [
7 7
               {:title => 'Bills in the News',
8 8
               :partial => 'bill',
9  
-              :collection => Bill.find_by_most_commentary('news', 5, 7.days, DEFAULT_CONGRESS),
  9
+              :collection => Bill.find_by_most_commentary('news', 5, 7.days, Settings.default_congress),
10 10
               :id => 'bns',
11 11
               :link => 'bill/most/news?types=all',
12 12
               :count_type => 'news_articles'},
13 13
               {:title => 'Bills on Blogs',
14 14
               :partial => 'bill',
15  
-              :collection => Bill.find_by_most_commentary('blog', 5, 7.days, DEFAULT_CONGRESS),
  15
+              :collection => Bill.find_by_most_commentary('blog', 5, 7.days, Settings.default_congress),
16 16
               :id => 'bbg',
17 17
               :link => 'bill/most/blog?types=all',
18 18
               :style => 'display: none;',
@@ -26,28 +26,28 @@ def index
26 26
               :count_type => 'views'},
27 27
               {:title => 'Most-Viewed Bills',
28 28
               :partial => 'bill',
29  
-              :collection => ObjectAggregate.popular('Bill', DEFAULT_COUNT_TIME, 5),
  29
+              :collection => ObjectAggregate.popular('Bill', Settings.default_count_time, 5),
30 30
               :id => "bv",
31 31
               :link => '/bill/most/viewed',
32 32
               :style => 'display: none;',
33 33
               :count_type => 'views'},
34 34
               {:title => 'Most-Viewed Senators',
35 35
               :partial => 'person',
36  
-              :collection => Person.list_chamber('sen', DEFAULT_CONGRESS, "view_count desc", 5),
  36
+              :collection => Person.list_chamber('sen', Settings.default_congress, "view_count desc", 5),
37 37
               :id => 'ps',
38 38
               :style => 'display: none;',
39 39
               :link => '/people/senators?sort=popular',
40 40
               :count_type => 'views'},
41 41
               {:title => 'Most-Viewed Reps',
42 42
               :partial => 'person',
43  
-              :collection => Person.list_chamber('rep', DEFAULT_CONGRESS, "view_count desc", 5),
  43
+              :collection => Person.list_chamber('rep', Settings.default_congress, "view_count desc", 5),
44 44
               :link => '/people/representatives?sort=popular',
45 45
               :style => 'display: none;',
46 46
               :id => 'pr',
47 47
               :count_type => 'views'},
48 48
               {:title => 'Most-Viewed Issues',
49 49
               :partial => 'issue',
50  
-              :collection => ObjectAggregate.popular('Subject', DEFAULT_COUNT_TIME, 5),
  50
+              :collection => ObjectAggregate.popular('Subject', Settings.default_count_time, 5),
51 51
               :style => 'display: none;',
52 52
               :id => 'pis',
53 53
               :link => '/issues',
7  app/controllers/issue_controller.rb
@@ -9,8 +9,7 @@ def index
9 9
 
10 10
   def alphabetical
11 11
     @sort = :alphabetical
12  
-    
13  
-    @carousel = [ObjectAggregate.popular('Subject', DEFAULT_COUNT_TIME).slice(0..9)]
  12
+    @carousel = [ObjectAggregate.popular('Subject', Settings.default_count_time).slice(0..9)]
14 13
     
15 14
     letter = params[:id]
16 15
     if letter.nil?
@@ -55,7 +54,7 @@ def by_most_viewed
55 54
   def by_bill_count
56 55
     @sort = :by_bill_count
57 56
 
58  
-    @carousel = [ObjectAggregate.popular('Subject', DEFAULT_COUNT_TIME).slice(0..9)] 
  57
+    @carousel = [ObjectAggregate.popular('Subject', Settings.default_count_time).slice(0..9)] 
59 58
 
60 59
     @order = :bill_count
61 60
     @subjects = Subject.find(:all, :order => 'bill_count desc, term asc').paginate
@@ -73,7 +72,7 @@ def comments
73 72
     unless @subject
74 73
        render :partial => "index/notfound_page", :layout => 'application', :status => "404" and return 
75 74
     end
76  
-    congress = params[:congress] ? params[:congress] : DEFAULT_CONGRESS
  75
+    congress = params[:congress] ? params[:congress] : Settings.default_congress
77 76
       respond_to do |format|