Skip to content
This repository
Browse code

first commit

  • Loading branch information...
commit f270a941983d1630fa5069d25611aa3d6103132c 0 parents
Fernando Guillen authored December 07, 2008

Showing 227 changed files with 11,949 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  .gitignore
  2. 256  README
  3. 10  Rakefile
  4. 15  app/controllers/application.rb
  5. 85  app/controllers/attends_controller.rb
  6. 85  app/controllers/comments_controller.rb
  7. 85  app/controllers/configurations_controller.rb
  8. 85  app/controllers/events_controller.rb
  9. 85  app/controllers/files_controller.rb
  10. 85  app/controllers/paper_types_controller.rb
  11. 85  app/controllers/papers_controller.rb
  12. 85  app/controllers/payments_controller.rb
  13. 85  app/controllers/reporters_controller.rb
  14. 85  app/controllers/roles_controller.rb
  15. 85  app/controllers/rooms_controller.rb
  16. 85  app/controllers/speakers_controller.rb
  17. 85  app/controllers/tries_controller.rb
  18. 85  app/controllers/users_controller.rb
  19. 85  app/controllers/votes_controller.rb
  20. 3  app/helpers/application_helper.rb
  21. 2  app/helpers/attends_helper.rb
  22. 2  app/helpers/comments_helper.rb
  23. 2  app/helpers/configurations_helper.rb
  24. 2  app/helpers/events_helper.rb
  25. 2  app/helpers/files_helper.rb
  26. 2  app/helpers/paper_types_helper.rb
  27. 2  app/helpers/papers_helper.rb
  28. 2  app/helpers/payments_helper.rb
  29. 2  app/helpers/reporters_helper.rb
  30. 2  app/helpers/roles_helper.rb
  31. 2  app/helpers/rooms_helper.rb
  32. 2  app/helpers/speakers_helper.rb
  33. 2  app/helpers/tries_helper.rb
  34. 2  app/helpers/users_helper.rb
  35. 2  app/helpers/votes_helper.rb
  36. 2  app/models/attend.rb
  37. 2  app/models/comment.rb
  38. 2  app/models/configuration.rb
  39. 2  app/models/event.rb
  40. 2  app/models/paper.rb
  41. 2  app/models/paper_type.rb
  42. 2  app/models/payment.rb
  43. 2  app/models/reporter.rb
  44. 2  app/models/role.rb
  45. 2  app/models/room.rb
  46. 2  app/models/speaker.rb
  47. 2  app/models/try.rb
  48. 2  app/models/user.rb
  49. 2  app/models/vote.rb
  50. 12  app/views/attends/edit.html.erb
  51. 18  app/views/attends/index.html.erb
  52. 11  app/views/attends/new.html.erb
  53. 3  app/views/attends/show.html.erb
  54. 12  app/views/comments/edit.html.erb
  55. 18  app/views/comments/index.html.erb
  56. 11  app/views/comments/new.html.erb
  57. 3  app/views/comments/show.html.erb
  58. 12  app/views/configurations/edit.html.erb
  59. 18  app/views/configurations/index.html.erb
  60. 11  app/views/configurations/new.html.erb
  61. 3  app/views/configurations/show.html.erb
  62. 12  app/views/events/edit.html.erb
  63. 18  app/views/events/index.html.erb
  64. 11  app/views/events/new.html.erb
  65. 3  app/views/events/show.html.erb
  66. 12  app/views/files/edit.html.erb
  67. 18  app/views/files/index.html.erb
  68. 11  app/views/files/new.html.erb
  69. 3  app/views/files/show.html.erb
  70. 17  app/views/layouts/attends.html.erb
  71. 17  app/views/layouts/comments.html.erb
  72. 17  app/views/layouts/configurations.html.erb
  73. 17  app/views/layouts/events.html.erb
  74. 17  app/views/layouts/files.html.erb
  75. 17  app/views/layouts/paper_types.html.erb
  76. 17  app/views/layouts/papers.html.erb
  77. 17  app/views/layouts/payments.html.erb
  78. 17  app/views/layouts/reporters.html.erb
  79. 17  app/views/layouts/roles.html.erb
  80. 17  app/views/layouts/rooms.html.erb
  81. 17  app/views/layouts/speakers.html.erb
  82. 17  app/views/layouts/tries.html.erb
  83. 17  app/views/layouts/users.html.erb
  84. 17  app/views/layouts/votes.html.erb
  85. 12  app/views/paper_types/edit.html.erb
  86. 18  app/views/paper_types/index.html.erb
  87. 11  app/views/paper_types/new.html.erb
  88. 3  app/views/paper_types/show.html.erb
  89. 12  app/views/papers/edit.html.erb
  90. 18  app/views/papers/index.html.erb
  91. 11  app/views/papers/new.html.erb
  92. 3  app/views/papers/show.html.erb
  93. 12  app/views/payments/edit.html.erb
  94. 18  app/views/payments/index.html.erb
  95. 11  app/views/payments/new.html.erb
  96. 3  app/views/payments/show.html.erb
  97. 12  app/views/reporters/edit.html.erb
  98. 18  app/views/reporters/index.html.erb
  99. 11  app/views/reporters/new.html.erb
  100. 3  app/views/reporters/show.html.erb
  101. 12  app/views/roles/edit.html.erb
  102. 18  app/views/roles/index.html.erb
  103. 11  app/views/roles/new.html.erb
  104. 3  app/views/roles/show.html.erb
  105. 12  app/views/rooms/edit.html.erb
  106. 18  app/views/rooms/index.html.erb
  107. 11  app/views/rooms/new.html.erb
  108. 3  app/views/rooms/show.html.erb
  109. 12  app/views/speakers/edit.html.erb
  110. 18  app/views/speakers/index.html.erb
  111. 11  app/views/speakers/new.html.erb
  112. 3  app/views/speakers/show.html.erb
  113. 16  app/views/tries/edit.html.erb
  114. 20  app/views/tries/index.html.erb
  115. 15  app/views/tries/new.html.erb
  116. 8  app/views/tries/show.html.erb
  117. 12  app/views/users/edit.html.erb
  118. 18  app/views/users/index.html.erb
  119. 11  app/views/users/new.html.erb
  120. 3  app/views/users/show.html.erb
  121. 12  app/views/votes/edit.html.erb
  122. 18  app/views/votes/index.html.erb
  123. 11  app/views/votes/new.html.erb
  124. 3  app/views/votes/show.html.erb
  125. 109  config/boot.rb
  126. 22  config/database.yml
  127. 75  config/environment.rb
  128. 17  config/environments/development.rb
  129. 24  config/environments/production.rb
  130. 22  config/environments/test.rb
  131. 10  config/initializers/inflections.rb
  132. 5  config/initializers/mime_types.rb
  133. 17  config/initializers/new_rails_defaults.rb
  134. 5  config/locales/en.yml
  135. 73  config/routes.rb
  136. BIN  db/development.sqlite3
  137. 14  db/migrate/20081207124433_create_users.rb
  138. 12  db/migrate/20081207124519_create_payments.rb
  139. 12  db/migrate/20081207124529_create_events.rb
  140. 12  db/migrate/20081207124534_create_roles.rb
  141. 12  db/migrate/20081207124540_create_configurations.rb
  142. 12  db/migrate/20081207124613_create_papers.rb
  143. 12  db/migrate/20081207124640_create_reporters.rb
  144. 12  db/migrate/20081207125053_create_speakers.rb
  145. 12  db/migrate/20081207125103_create_rooms.rb
  146. 12  db/migrate/20081207125110_create_comments.rb
  147. 12  db/migrate/20081207125238_create_paper_types.rb
  148. 12  db/migrate/20081207125657_create_votes.rb
  149. 12  db/migrate/20081207125808_create_attends.rb
  150. 13  db/migrate/20081207125955_create_tries.rb
  151. 14  db/schema.rb
  152. 5  doc/README_FOR_APP
  153. 30  public/404.html
  154. 30  public/422.html
  155. 33  public/500.html
  156. 10  public/dispatch.cgi
  157. 24  public/dispatch.fcgi
  158. 10  public/dispatch.rb
  159. 0  public/favicon.ico
  160. BIN  public/images/rails.png
  161. 274  public/index.html
  162. 2  public/javascripts/application.js
  163. 963  public/javascripts/controls.js
  164. 973  public/javascripts/dragdrop.js
  165. 1,128  public/javascripts/effects.js
  166. 4,320  public/javascripts/prototype.js
  167. 5  public/robots.txt
  168. 54  public/stylesheets/scaffold.css
  169. 4  script/about
  170. 3  script/console
  171. 3  script/dbconsole
  172. 3  script/destroy
  173. 3  script/generate
  174. 3  script/performance/benchmarker
  175. 3  script/performance/profiler
  176. 3  script/performance/request
  177. 3  script/plugin
  178. 3  script/process/inspector
  179. 3  script/process/reaper
  180. 3  script/process/spawner
  181. 3  script/runner
  182. 3  script/server
  183. 7  test/fixtures/attends.yml
  184. 7  test/fixtures/comments.yml
  185. 7  test/fixtures/configurations.yml
  186. 7  test/fixtures/events.yml
  187. 7  test/fixtures/paper_types.yml
  188. 7  test/fixtures/papers.yml
  189. 7  test/fixtures/payments.yml
  190. 7  test/fixtures/reporters.yml
  191. 7  test/fixtures/roles.yml
  192. 7  test/fixtures/rooms.yml
  193. 7  test/fixtures/speakers.yml
  194. 7  test/fixtures/tries.yml
  195. 7  test/fixtures/users.yml
  196. 7  test/fixtures/votes.yml
  197. 45  test/functional/attends_controller_test.rb
  198. 45  test/functional/comments_controller_test.rb
  199. 45  test/functional/configurations_controller_test.rb
  200. 45  test/functional/events_controller_test.rb
  201. 45  test/functional/files_controller_test.rb
  202. 45  test/functional/paper_types_controller_test.rb
  203. 45  test/functional/papers_controller_test.rb
  204. 45  test/functional/payments_controller_test.rb
  205. 45  test/functional/reporters_controller_test.rb
  206. 45  test/functional/roles_controller_test.rb
  207. 45  test/functional/rooms_controller_test.rb
  208. 45  test/functional/speakers_controller_test.rb
  209. 45  test/functional/tries_controller_test.rb
  210. 45  test/functional/users_controller_test.rb
  211. 45  test/functional/votes_controller_test.rb
  212. 9  test/performance/browsing_test.rb
  213. 38  test/test_helper.rb
  214. 8  test/unit/attend_test.rb
  215. 8  test/unit/comment_test.rb
  216. 8  test/unit/configuration_test.rb
  217. 8  test/unit/event_test.rb
  218. 8  test/unit/paper_test.rb
  219. 8  test/unit/paper_type_test.rb
  220. 8  test/unit/payment_test.rb
  221. 8  test/unit/reporter_test.rb
  222. 8  test/unit/role_test.rb
  223. 8  test/unit/room_test.rb
  224. 8  test/unit/speaker_test.rb
  225. 8  test/unit/try_test.rb
  226. 8  test/unit/user_test.rb
  227. 8  test/unit/vote_test.rb
2  .gitignore
... ...
@@ -0,0 +1,2 @@
  1
+log
  2
+db/*sqlite
256  README
... ...
@@ -0,0 +1,256 @@
  1
+== Welcome to Rails
  2
+
  3
+Rails is a web-application framework that includes everything needed to create 
  4
+database-backed web applications according to the Model-View-Control pattern. 
  5
+
  6
+This pattern splits the view (also called the presentation) into "dumb" templates
  7
+that are primarily responsible for inserting pre-built data in between HTML tags.
  8
+The model contains the "smart" domain objects (such as Account, Product, Person,
  9
+Post) that holds all the business logic and knows how to persist themselves to
  10
+a database. The controller handles the incoming requests (such as Save New Account,
  11
+Update Product, Show Post) by manipulating the model and directing data to the view.
  12
+
  13
+In Rails, the model is handled by what's called an object-relational mapping
  14
+layer entitled Active Record. This layer allows you to present the data from
  15
+database rows as objects and embellish these data objects with business logic
  16
+methods. You can read more about Active Record in
  17
+link:files/vendor/rails/activerecord/README.html.
  18
+
  19
+The controller and view are handled by the Action Pack, which handles both
  20
+layers by its two parts: Action View and Action Controller. These two layers
  21
+are bundled in a single package due to their heavy interdependence. This is
  22
+unlike the relationship between the Active Record and Action Pack that is much
  23
+more separate. Each of these packages can be used independently outside of
  24
+Rails.  You can read more about Action Pack in
  25
+link:files/vendor/rails/actionpack/README.html.
  26
+
  27
+
  28
+== Getting Started
  29
+
  30
+1. At the command prompt, start a new Rails application using the <tt>rails</tt> command
  31
+   and your application name. Ex: rails myapp
  32
+2. Change directory into myapp and start the web server: <tt>script/server</tt> (run with --help for options)
  33
+3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!"
  34
+4. Follow the guidelines to start developing your application
  35
+
  36
+
  37
+== Web Servers
  38
+
  39
+By default, Rails will try to use Mongrel and lighttpd if they are installed, otherwise
  40
+Rails will use WEBrick, the webserver that ships with Ruby. When you run script/server,
  41
+Rails will check if Mongrel exists, then lighttpd and finally fall back to WEBrick. This ensures
  42
+that you can always get up and running quickly.
  43
+
  44
+Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is
  45
+suitable for development and deployment of Rails applications. If you have Ruby Gems installed,
  46
+getting up and running with mongrel is as easy as: <tt>gem install mongrel</tt>.
  47
+More info at: http://mongrel.rubyforge.org
  48
+
  49
+If Mongrel is not installed, Rails will look for lighttpd. It's considerably faster than
  50
+Mongrel and WEBrick and also suited for production use, but requires additional
  51
+installation and currently only works well on OS X/Unix (Windows users are encouraged
  52
+to start with Mongrel). We recommend version 1.4.11 and higher. You can download it from
  53
+http://www.lighttpd.net.
  54
+
  55
+And finally, if neither Mongrel or lighttpd are installed, Rails will use the built-in Ruby
  56
+web server, WEBrick. WEBrick is a small Ruby web server suitable for development, but not
  57
+for production.
  58
+
  59
+But of course its also possible to run Rails on any platform that supports FCGI.
  60
+Apache, LiteSpeed, IIS are just a few. For more information on FCGI,
  61
+please visit: http://wiki.rubyonrails.com/rails/pages/FastCGI
  62
+
  63
+
  64
+== Apache .htaccess example
  65
+
  66
+# General Apache options
  67
+AddHandler fastcgi-script .fcgi
  68
+AddHandler cgi-script .cgi
  69
+Options +FollowSymLinks +ExecCGI
  70
+
  71
+# If you don't want Rails to look in certain directories,
  72
+# use the following rewrite rules so that Apache won't rewrite certain requests
  73
+# 
  74
+# Example:
  75
+#   RewriteCond %{REQUEST_URI} ^/notrails.*
  76
+#   RewriteRule .* - [L]
  77
+
  78
+# Redirect all requests not available on the filesystem to Rails
  79
+# By default the cgi dispatcher is used which is very slow
  80
+# 
  81
+# For better performance replace the dispatcher with the fastcgi one
  82
+#
  83
+# Example:
  84
+#   RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
  85
+RewriteEngine On
  86
+
  87
+# If your Rails application is accessed via an Alias directive,
  88
+# then you MUST also set the RewriteBase in this htaccess file.
  89
+#
  90
+# Example:
  91
+#   Alias /myrailsapp /path/to/myrailsapp/public
  92
+#   RewriteBase /myrailsapp
  93
+
  94
+RewriteRule ^$ index.html [QSA]
  95
+RewriteRule ^([^.]+)$ $1.html [QSA]
  96
+RewriteCond %{REQUEST_FILENAME} !-f
  97
+RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
  98
+
  99
+# In case Rails experiences terminal errors
  100
+# Instead of displaying this message you can supply a file here which will be rendered instead
  101
+# 
  102
+# Example:
  103
+#   ErrorDocument 500 /500.html
  104
+
  105
+ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
  106
+
  107
+
  108
+== Debugging Rails
  109
+
  110
+Sometimes your application goes wrong.  Fortunately there are a lot of tools that
  111
+will help you debug it and get it back on the rails.
  112
+
  113
+First area to check is the application log files.  Have "tail -f" commands running
  114
+on the server.log and development.log. Rails will automatically display debugging
  115
+and runtime information to these files. Debugging info will also be shown in the
  116
+browser on requests from 127.0.0.1.
  117
+
  118
+You can also log your own messages directly into the log file from your code using
  119
+the Ruby logger class from inside your controllers. Example:
  120
+
  121
+  class WeblogController < ActionController::Base
  122
+    def destroy
  123
+      @weblog = Weblog.find(params[:id])
  124
+      @weblog.destroy
  125
+      logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
  126
+    end
  127
+  end
  128
+
  129
+The result will be a message in your log file along the lines of:
  130
+
  131
+  Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1
  132
+
  133
+More information on how to use the logger is at http://www.ruby-doc.org/core/
  134
+
  135
+Also, Ruby documentation can be found at http://www.ruby-lang.org/ including:
  136
+
  137
+* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/
  138
+* Learn to Program: http://pine.fm/LearnToProgram/  (a beginners guide)
  139
+
  140
+These two online (and free) books will bring you up to speed on the Ruby language
  141
+and also on programming in general.
  142
+
  143
+
  144
+== Debugger
  145
+
  146
+Debugger support is available through the debugger command when you start your Mongrel or
  147
+Webrick server with --debugger. This means that you can break out of execution at any point
  148
+in the code, investigate and change the model, AND then resume execution! 
  149
+You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
  150
+Example:
  151
+
  152
+  class WeblogController < ActionController::Base
  153
+    def index
  154
+      @posts = Post.find(:all)
  155
+      debugger
  156
+    end
  157
+  end
  158
+
  159
+So the controller will accept the action, run the first line, then present you
  160
+with a IRB prompt in the server window. Here you can do things like:
  161
+
  162
+  >> @posts.inspect
  163
+  => "[#<Post:0x14a6be8 @attributes={\"title\"=>nil, \"body\"=>nil, \"id\"=>\"1\"}>,
  164
+       #<Post:0x14a6620 @attributes={\"title\"=>\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]"
  165
+  >> @posts.first.title = "hello from a debugger"
  166
+  => "hello from a debugger"
  167
+
  168
+...and even better is that you can examine how your runtime objects actually work:
  169
+
  170
+  >> f = @posts.first
  171
+  => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
  172
+  >> f.
  173
+  Display all 152 possibilities? (y or n)
  174
+
  175
+Finally, when you're ready to resume execution, you enter "cont"
  176
+
  177
+
  178
+== Console
  179
+
  180
+You can interact with the domain model by starting the console through <tt>script/console</tt>.
  181
+Here you'll have all parts of the application configured, just like it is when the
  182
+application is running. You can inspect domain models, change values, and save to the
  183
+database. Starting the script without arguments will launch it in the development environment.
  184
+Passing an argument will specify a different environment, like <tt>script/console production</tt>.
  185
+
  186
+To reload your controllers and models after launching the console run <tt>reload!</tt>
  187
+
  188
+== dbconsole
  189
+
  190
+You can go to the command line of your database directly through <tt>script/dbconsole</tt>.
  191
+You would be connected to the database with the credentials defined in database.yml.
  192
+Starting the script without arguments will connect you to the development database. Passing an
  193
+argument will connect you to a different database, like <tt>script/dbconsole production</tt>.
  194
+Currently works for mysql, postgresql and sqlite.
  195
+
  196
+== Description of Contents
  197
+
  198
+app
  199
+  Holds all the code that's specific to this particular application.
  200
+
  201
+app/controllers
  202
+  Holds controllers that should be named like weblogs_controller.rb for
  203
+  automated URL mapping. All controllers should descend from ApplicationController
  204
+  which itself descends from ActionController::Base.
  205
+
  206
+app/models
  207
+  Holds models that should be named like post.rb.
  208
+  Most models will descend from ActiveRecord::Base.
  209
+
  210
+app/views
  211
+  Holds the template files for the view that should be named like
  212
+  weblogs/index.html.erb for the WeblogsController#index action. All views use eRuby
  213
+  syntax.
  214
+
  215
+app/views/layouts
  216
+  Holds the template files for layouts to be used with views. This models the common
  217
+  header/footer method of wrapping views. In your views, define a layout using the
  218
+  <tt>layout :default</tt> and create a file named default.html.erb. Inside default.html.erb,
  219
+  call <% yield %> to render the view using this layout.
  220
+
  221
+app/helpers
  222
+  Holds view helpers that should be named like weblogs_helper.rb. These are generated
  223
+  for you automatically when using script/generate for controllers. Helpers can be used to
  224
+  wrap functionality for your views into methods.
  225
+
  226
+config
  227
+  Configuration files for the Rails environment, the routing map, the database, and other dependencies.
  228
+
  229
+db
  230
+  Contains the database schema in schema.rb.  db/migrate contains all
  231
+  the sequence of Migrations for your schema.
  232
+
  233
+doc
  234
+  This directory is where your application documentation will be stored when generated
  235
+  using <tt>rake doc:app</tt>
  236
+
  237
+lib
  238
+  Application specific libraries. Basically, any kind of custom code that doesn't
  239
+  belong under controllers, models, or helpers. This directory is in the load path.
  240
+
  241
+public
  242
+  The directory available for the web server. Contains subdirectories for images, stylesheets,
  243
+  and javascripts. Also contains the dispatchers and the default HTML files. This should be
  244
+  set as the DOCUMENT_ROOT of your web server.
  245
+
  246
+script
  247
+  Helper scripts for automation and generation.
  248
+
  249
+test
  250
+  Unit and functional tests along with fixtures. When using the script/generate scripts, template
  251
+  test files will be generated for you and placed in this directory.
  252
+
  253
+vendor
  254
+  External libraries that the application depends on. Also includes the plugins subdirectory.
  255
+  If the app has frozen rails, those gems also go here, under vendor/rails/.
  256
+  This directory is in the load path.
10  Rakefile
... ...
@@ -0,0 +1,10 @@
  1
+# Add your own tasks in files placed in lib/tasks ending in .rake,
  2
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
  3
+
  4
+require(File.join(File.dirname(__FILE__), 'config', 'boot'))
  5
+
  6
+require 'rake'
  7
+require 'rake/testtask'
  8
+require 'rake/rdoctask'
  9
+
  10
+require 'tasks/rails'
15  app/controllers/application.rb
... ...
@@ -0,0 +1,15 @@
  1
+# Filters added to this controller apply to all controllers in the application.
  2
+# Likewise, all the methods added will be available for all controllers.
  3
+
  4
+class ApplicationController < ActionController::Base
  5
+  helper :all # include all helpers, all the time
  6
+
  7
+  # See ActionController::RequestForgeryProtection for details
  8
+  # Uncomment the :secret if you're not using the cookie session store
  9
+  protect_from_forgery # :secret => 'aa97b2b8739be1577cff43d58dadd211'
  10
+  
  11
+  # See ActionController::Base for details 
  12
+  # Uncomment this to filter the contents of submitted sensitive data parameters
  13
+  # from your application log (in this case, all fields with names like "password"). 
  14
+  # filter_parameter_logging :password
  15
+end
85  app/controllers/attends_controller.rb
... ...
@@ -0,0 +1,85 @@
  1
+class AttendsController < ApplicationController
  2
+  # GET /attends
  3
+  # GET /attends.xml
  4
+  def index
  5
+    @attends = Attend.find(:all)
  6
+
  7
+    respond_to do |format|
  8
+      format.html # index.html.erb
  9
+      format.xml  { render :xml => @attends }
  10
+    end
  11
+  end
  12
+
  13
+  # GET /attends/1
  14
+  # GET /attends/1.xml
  15
+  def show
  16
+    @attend = Attend.find(params[:id])
  17
+
  18
+    respond_to do |format|
  19
+      format.html # show.html.erb
  20
+      format.xml  { render :xml => @attend }
  21
+    end
  22
+  end
  23
+
  24
+  # GET /attends/new
  25
+  # GET /attends/new.xml
  26
+  def new
  27
+    @attend = Attend.new
  28
+
  29
+    respond_to do |format|
  30
+      format.html # new.html.erb
  31
+      format.xml  { render :xml => @attend }
  32
+    end
  33
+  end
  34
+
  35
+  # GET /attends/1/edit
  36
+  def edit
  37
+    @attend = Attend.find(params[:id])
  38
+  end
  39
+
  40
+  # POST /attends
  41
+  # POST /attends.xml
  42
+  def create
  43
+    @attend = Attend.new(params[:attend])
  44
+
  45
+    respond_to do |format|
  46
+      if @attend.save
  47
+        flash[:notice] = 'Attend was successfully created.'
  48
+        format.html { redirect_to(@attend) }
  49
+        format.xml  { render :xml => @attend, :status => :created, :location => @attend }
  50
+      else
  51
+        format.html { render :action => "new" }
  52
+        format.xml  { render :xml => @attend.errors, :status => :unprocessable_entity }
  53
+      end
  54
+    end
  55
+  end
  56
+
  57
+  # PUT /attends/1
  58
+  # PUT /attends/1.xml
  59
+  def update
  60
+    @attend = Attend.find(params[:id])
  61
+
  62
+    respond_to do |format|
  63
+      if @attend.update_attributes(params[:attend])
  64
+        flash[:notice] = 'Attend was successfully updated.'
  65
+        format.html { redirect_to(@attend) }
  66
+        format.xml  { head :ok }
  67
+      else
  68
+        format.html { render :action => "edit" }
  69
+        format.xml  { render :xml => @attend.errors, :status => :unprocessable_entity }
  70
+      end
  71
+    end
  72
+  end
  73
+
  74
+  # DELETE /attends/1
  75
+  # DELETE /attends/1.xml
  76
+  def destroy
  77
+    @attend = Attend.find(params[:id])
  78
+    @attend.destroy
  79
+
  80
+    respond_to do |format|
  81
+      format.html { redirect_to(attends_url) }
  82
+      format.xml  { head :ok }
  83
+    end
  84
+  end
  85
+end
85  app/controllers/comments_controller.rb
... ...
@@ -0,0 +1,85 @@
  1
+class CommentsController < ApplicationController
  2
+  # GET /comments
  3
+  # GET /comments.xml
  4
+  def index
  5
+    @comments = Comment.find(:all)
  6
+
  7
+    respond_to do |format|
  8
+      format.html # index.html.erb
  9
+      format.xml  { render :xml => @comments }
  10
+    end
  11
+  end
  12
+
  13
+  # GET /comments/1
  14
+  # GET /comments/1.xml
  15
+  def show
  16
+    @comment = Comment.find(params[:id])
  17
+
  18
+    respond_to do |format|
  19
+      format.html # show.html.erb
  20
+      format.xml  { render :xml => @comment }
  21
+    end
  22
+  end
  23
+
  24
+  # GET /comments/new
  25
+  # GET /comments/new.xml
  26
+  def new
  27
+    @comment = Comment.new
  28
+
  29
+    respond_to do |format|
  30
+      format.html # new.html.erb
  31
+      format.xml  { render :xml => @comment }
  32
+    end
  33
+  end
  34
+
  35
+  # GET /comments/1/edit
  36
+  def edit
  37
+    @comment = Comment.find(params[:id])
  38
+  end
  39
+
  40
+  # POST /comments
  41
+  # POST /comments.xml
  42
+  def create
  43
+    @comment = Comment.new(params[:comment])
  44
+
  45
+    respond_to do |format|
  46
+      if @comment.save
  47
+        flash[:notice] = 'Comment was successfully created.'
  48
+        format.html { redirect_to(@comment) }
  49
+        format.xml  { render :xml => @comment, :status => :created, :location => @comment }
  50
+      else
  51
+        format.html { render :action => "new" }
  52
+        format.xml  { render :xml => @comment.errors, :status => :unprocessable_entity }
  53
+      end
  54
+    end
  55
+  end
  56
+
  57
+  # PUT /comments/1
  58
+  # PUT /comments/1.xml
  59
+  def update
  60
+    @comment = Comment.find(params[:id])
  61
+
  62
+    respond_to do |format|
  63
+      if @comment.update_attributes(params[:comment])
  64
+        flash[:notice] = 'Comment was successfully updated.'
  65
+        format.html { redirect_to(@comment) }
  66
+        format.xml  { head :ok }
  67
+      else
  68
+        format.html { render :action => "edit" }
  69
+        format.xml  { render :xml => @comment.errors, :status => :unprocessable_entity }
  70
+      end
  71
+    end
  72
+  end
  73
+
  74
+  # DELETE /comments/1
  75
+  # DELETE /comments/1.xml
  76
+  def destroy
  77
+    @comment = Comment.find(params[:id])
  78
+    @comment.destroy
  79
+
  80
+    respond_to do |format|
  81
+      format.html { redirect_to(comments_url) }
  82
+      format.xml  { head :ok }
  83
+    end
  84
+  end
  85
+end
85  app/controllers/configurations_controller.rb
... ...
@@ -0,0 +1,85 @@
  1
+class ConfigurationsController < ApplicationController
  2
+  # GET /configurations
  3
+  # GET /configurations.xml
  4
+  def index
  5
+    @configurations = Configuration.find(:all)
  6
+
  7
+    respond_to do |format|
  8
+      format.html # index.html.erb
  9
+      format.xml  { render :xml => @configurations }
  10
+    end
  11
+  end
  12
+
  13
+  # GET /configurations/1
  14
+  # GET /configurations/1.xml
  15
+  def show
  16
+    @configuration = Configuration.find(params[:id])
  17
+
  18
+    respond_to do |format|
  19
+      format.html # show.html.erb
  20
+      format.xml  { render :xml => @configuration }
  21
+    end
  22
+  end
  23
+
  24
+  # GET /configurations/new
  25
+  # GET /configurations/new.xml
  26
+  def new
  27
+    @configuration = Configuration.new
  28
+
  29
+    respond_to do |format|
  30
+      format.html # new.html.erb
  31
+      format.xml  { render :xml => @configuration }
  32
+    end
  33
+  end
  34
+
  35
+  # GET /configurations/1/edit
  36
+  def edit
  37
+    @configuration = Configuration.find(params[:id])
  38
+  end
  39
+
  40
+  # POST /configurations
  41
+  # POST /configurations.xml
  42
+  def create
  43
+    @configuration = Configuration.new(params[:configuration])
  44
+
  45
+    respond_to do |format|
  46
+      if @configuration.save
  47
+        flash[:notice] = 'Configuration was successfully created.'
  48
+        format.html { redirect_to(@configuration) }
  49
+        format.xml  { render :xml => @configuration, :status => :created, :location => @configuration }
  50
+      else
  51
+        format.html { render :action => "new" }
  52
+        format.xml  { render :xml => @configuration.errors, :status => :unprocessable_entity }
  53
+      end
  54
+    end
  55
+  end
  56
+
  57
+  # PUT /configurations/1
  58
+  # PUT /configurations/1.xml
  59
+  def update
  60
+    @configuration = Configuration.find(params[:id])
  61
+
  62
+    respond_to do |format|
  63
+      if @configuration.update_attributes(params[:configuration])
  64
+        flash[:notice] = 'Configuration was successfully updated.'
  65
+        format.html { redirect_to(@configuration) }
  66
+        format.xml  { head :ok }
  67
+      else
  68
+        format.html { render :action => "edit" }
  69
+        format.xml  { render :xml => @configuration.errors, :status => :unprocessable_entity }
  70
+      end
  71
+    end
  72
+  end
  73
+
  74
+  # DELETE /configurations/1
  75
+  # DELETE /configurations/1.xml
  76
+  def destroy
  77
+    @configuration = Configuration.find(params[:id])
  78
+    @configuration.destroy
  79
+
  80
+    respond_to do |format|
  81
+      format.html { redirect_to(configurations_url) }
  82
+      format.xml  { head :ok }
  83
+    end
  84
+  end
  85
+end
85  app/controllers/events_controller.rb
... ...
@@ -0,0 +1,85 @@
  1
+class EventsController < ApplicationController
  2
+  # GET /events
  3
+  # GET /events.xml
  4
+  def index
  5
+    @events = Event.find(:all)
  6
+
  7
+    respond_to do |format|
  8
+      format.html # index.html.erb
  9
+      format.xml  { render :xml => @events }
  10
+    end
  11
+  end
  12
+
  13
+  # GET /events/1
  14
+  # GET /events/1.xml
  15
+  def show
  16
+    @event = Event.find(params[:id])
  17
+
  18
+    respond_to do |format|
  19
+      format.html # show.html.erb
  20
+      format.xml  { render :xml => @event }
  21
+    end
  22
+  end
  23
+
  24
+  # GET /events/new
  25
+  # GET /events/new.xml
  26
+  def new
  27
+    @event = Event.new
  28
+
  29
+    respond_to do |format|
  30
+      format.html # new.html.erb
  31
+      format.xml  { render :xml => @event }
  32
+    end
  33
+  end
  34
+
  35
+  # GET /events/1/edit
  36
+  def edit
  37
+    @event = Event.find(params[:id])
  38
+  end
  39
+
  40
+  # POST /events
  41
+  # POST /events.xml
  42
+  def create
  43
+    @event = Event.new(params[:event])
  44
+
  45
+    respond_to do |format|
  46
+      if @event.save
  47
+        flash[:notice] = 'Event was successfully created.'
  48
+        format.html { redirect_to(@event) }
  49
+        format.xml  { render :xml => @event, :status => :created, :location => @event }
  50
+      else
  51
+        format.html { render :action => "new" }
  52
+        format.xml  { render :xml => @event.errors, :status => :unprocessable_entity }
  53
+      end
  54
+    end
  55
+  end
  56
+
  57
+  # PUT /events/1
  58
+  # PUT /events/1.xml
  59
+  def update
  60
+    @event = Event.find(params[:id])
  61
+
  62
+    respond_to do |format|
  63
+      if @event.update_attributes(params[:event])
  64
+        flash[:notice] = 'Event was successfully updated.'
  65
+        format.html { redirect_to(@event) }
  66
+        format.xml  { head :ok }
  67
+      else
  68
+        format.html { render :action => "edit" }
  69
+        format.xml  { render :xml => @event.errors, :status => :unprocessable_entity }
  70
+      end
  71
+    end
  72
+  end
  73
+
  74
+  # DELETE /events/1
  75
+  # DELETE /events/1.xml
  76
+  def destroy
  77
+    @event = Event.find(params[:id])
  78
+    @event.destroy
  79
+
  80
+    respond_to do |format|
  81
+      format.html { redirect_to(events_url) }
  82
+      format.xml  { head :ok }
  83
+    end
  84
+  end
  85
+end
85  app/controllers/files_controller.rb
... ...
@@ -0,0 +1,85 @@
  1
+class FilesController < ApplicationController
  2
+  # GET /files
  3
+  # GET /files.xml
  4
+  def index
  5
+    @files = File.find(:all)
  6
+
  7
+    respond_to do |format|
  8
+      format.html # index.html.erb
  9
+      format.xml  { render :xml => @files }
  10
+    end
  11
+  end
  12
+
  13
+  # GET /files/1
  14
+  # GET /files/1.xml
  15
+  def show
  16
+    @file = File.find(params[:id])
  17
+
  18
+    respond_to do |format|
  19
+      format.html # show.html.erb
  20
+      format.xml  { render :xml => @file }
  21
+    end
  22
+  end
  23
+
  24
+  # GET /files/new
  25
+  # GET /files/new.xml
  26
+  def new
  27
+    @file = File.new
  28
+
  29
+    respond_to do |format|
  30
+      format.html # new.html.erb
  31
+      format.xml  { render :xml => @file }
  32
+    end
  33
+  end
  34
+
  35
+  # GET /files/1/edit
  36
+  def edit
  37
+    @file = File.find(params[:id])
  38
+  end
  39
+
  40
+  # POST /files
  41
+  # POST /files.xml
  42
+  def create
  43
+    @file = File.new(params[:file])
  44
+
  45
+    respond_to do |format|
  46
+      if @file.save
  47
+        flash[:notice] = 'File was successfully created.'
  48
+        format.html { redirect_to(@file) }
  49
+        format.xml  { render :xml => @file, :status => :created, :location => @file }
  50
+      else
  51
+        format.html { render :action => "new" }
  52
+        format.xml  { render :xml => @file.errors, :status => :unprocessable_entity }
  53
+      end
  54
+    end
  55
+  end
  56
+
  57
+  # PUT /files/1
  58
+  # PUT /files/1.xml
  59
+  def update
  60
+    @file = File.find(params[:id])
  61
+
  62
+    respond_to do |format|
  63
+      if @file.update_attributes(params[:file])
  64
+        flash[:notice] = 'File was successfully updated.'
  65
+        format.html { redirect_to(@file) }
  66
+        format.xml  { head :ok }
  67
+      else
  68
+        format.html { render :action => "edit" }
  69
+        format.xml  { render :xml => @file.errors, :status => :unprocessable_entity }
  70
+      end
  71
+    end
  72
+  end
  73
+
  74
+  # DELETE /files/1
  75
+  # DELETE /files/1.xml
  76
+  def destroy
  77
+    @file = File.find(params[:id])
  78
+    @file.destroy
  79
+
  80
+    respond_to do |format|
  81
+      format.html { redirect_to(files_url) }
  82
+      format.xml  { head :ok }
  83
+    end
  84
+  end
  85
+end
85  app/controllers/paper_types_controller.rb
... ...
@@ -0,0 +1,85 @@
  1
+class PaperTypesController < ApplicationController
  2
+  # GET /paper_types
  3
+  # GET /paper_types.xml
  4
+  def index
  5
+    @paper_types = PaperType.find(:all)
  6
+
  7
+    respond_to do |format|
  8
+      format.html # index.html.erb
  9
+      format.xml  { render :xml => @paper_types }
  10
+    end
  11
+  end
  12
+
  13
+  # GET /paper_types/1
  14
+  # GET /paper_types/1.xml
  15
+  def show
  16
+    @paper_type = PaperType.find(params[:id])
  17
+
  18
+    respond_to do |format|
  19
+      format.html # show.html.erb
  20
+      format.xml  { render :xml => @paper_type }
  21
+    end
  22
+  end
  23
+
  24
+  # GET /paper_types/new
  25
+  # GET /paper_types/new.xml
  26
+  def new
  27
+    @paper_type = PaperType.new
  28
+
  29
+    respond_to do |format|
  30
+      format.html # new.html.erb
  31
+      format.xml  { render :xml => @paper_type }
  32
+    end
  33
+  end
  34
+
  35
+  # GET /paper_types/1/edit
  36
+  def edit
  37
+    @paper_type = PaperType.find(params[:id])
  38
+  end
  39
+
  40
+  # POST /paper_types
  41
+  # POST /paper_types.xml
  42
+  def create
  43
+    @paper_type = PaperType.new(params[:paper_type])
  44
+
  45
+    respond_to do |format|
  46
+      if @paper_type.save
  47
+        flash[:notice] = 'PaperType was successfully created.'
  48
+        format.html { redirect_to(@paper_type) }
  49
+        format.xml  { render :xml => @paper_type, :status => :created, :location => @paper_type }
  50
+      else
  51
+        format.html { render :action => "new" }
  52
+        format.xml  { render :xml => @paper_type.errors, :status => :unprocessable_entity }
  53
+      end
  54
+    end
  55
+  end
  56
+
  57
+  # PUT /paper_types/1
  58
+  # PUT /paper_types/1.xml
  59
+  def update
  60
+    @paper_type = PaperType.find(params[:id])
  61
+
  62
+    respond_to do |format|
  63
+      if @paper_type.update_attributes(params[:paper_type])
  64
+        flash[:notice] = 'PaperType was successfully updated.'
  65
+        format.html { redirect_to(@paper_type) }
  66
+        format.xml  { head :ok }
  67
+      else
  68
+        format.html { render :action => "edit" }
  69
+        format.xml  { render :xml => @paper_type.errors, :status => :unprocessable_entity }
  70
+      end
  71
+    end
  72
+  end
  73
+
  74
+  # DELETE /paper_types/1
  75
+  # DELETE /paper_types/1.xml
  76
+  def destroy
  77
+    @paper_type = PaperType.find(params[:id])
  78
+    @paper_type.destroy
  79
+
  80
+    respond_to do |format|
  81
+      format.html { redirect_to(paper_types_url) }
  82
+      format.xml  { head :ok }
  83
+    end
  84
+  end
  85
+end
85  app/controllers/papers_controller.rb
... ...
@@ -0,0 +1,85 @@
  1
+class PapersController < ApplicationController
  2
+  # GET /papers
  3
+  # GET /papers.xml
  4
+  def index
  5
+    @papers = Paper.find(:all)
  6
+
  7
+    respond_to do |format|
  8
+      format.html # index.html.erb
  9
+      format.xml  { render :xml => @papers }
  10
+    end
  11
+  end
  12
+
  13
+  # GET /papers/1
  14
+  # GET /papers/1.xml
  15
+  def show
  16
+    @paper = Paper.find(params[:id])
  17
+
  18
+    respond_to do |format|
  19
+      format.html # show.html.erb
  20
+      format.xml  { render :xml => @paper }
  21
+    end
  22
+  end
  23
+
  24
+  # GET /papers/new
  25
+  # GET /papers/new.xml
  26
+  def new
  27
+    @paper = Paper.new
  28
+
  29
+    respond_to do |format|
  30
+      format.html # new.html.erb
  31
+      format.xml  { render :xml => @paper }
  32
+    end
  33
+  end
  34
+
  35
+  # GET /papers/1/edit
  36
+  def edit
  37
+    @paper = Paper.find(params[:id])
  38
+  end
  39
+
  40
+  # POST /papers
  41
+  # POST /papers.xml
  42
+  def create
  43
+    @paper = Paper.new(params[:paper])
  44
+
  45
+    respond_to do |format|
  46
+      if @paper.save
  47
+        flash[:notice] = 'Paper was successfully created.'
  48
+        format.html { redirect_to(@paper) }
  49
+        format.xml  { render :xml => @paper, :status => :created, :location => @paper }
  50
+      else
  51
+        format.html { render :action => "new" }
  52
+        format.xml  { render :xml => @paper.errors, :status => :unprocessable_entity }
  53
+      end
  54
+    end
  55
+  end
  56
+
  57
+  # PUT /papers/1
  58
+  # PUT /papers/1.xml
  59
+  def update
  60
+    @paper = Paper.find(params[:id])
  61
+
  62
+    respond_to do |format|
  63
+      if @paper.update_attributes(params[:paper])
  64
+        flash[:notice] = 'Paper was successfully updated.'
  65
+        format.html { redirect_to(@paper) }
  66
+        format.xml  { head :ok }
  67
+      else
  68
+        format.html { render :action => "edit" }
  69
+        format.xml  { render :xml => @paper.errors, :status => :unprocessable_entity }
  70
+      end
  71
+    end
  72
+  end
  73
+
  74
+  # DELETE /papers/1
  75
+  # DELETE /papers/1.xml
  76
+  def destroy
  77
+    @paper = Paper.find(params[:id])
  78
+    @paper.destroy
  79
+
  80
+    respond_to do |format|
  81
+      format.html { redirect_to(papers_url) }
  82
+      format.xml  { head :ok }
  83
+    end
  84
+  end
  85
+end
85  app/controllers/payments_controller.rb
... ...
@@ -0,0 +1,85 @@
  1
+class PaymentsController < ApplicationController
  2
+  # GET /payments
  3
+  # GET /payments.xml
  4
+  def index
  5
+    @payments = Payment.find(:all)
  6
+
  7
+    respond_to do |format|
  8
+      format.html # index.html.erb
  9
+      format.xml  { render :xml => @payments }
  10
+    end
  11
+  end
  12
+
  13
+  # GET /payments/1
  14
+  # GET /payments/1.xml
  15
+  def show
  16
+    @payment = Payment.find(params[:id])
  17
+
  18
+    respond_to do |format|
  19
+      format.html # show.html.erb
  20
+      format.xml  { render :xml => @payment }
  21
+    end
  22
+  end
  23
+
  24
+  # GET /payments/new
  25
+  # GET /payments/new.xml
  26
+  def new
  27
+    @payment = Payment.new
  28
+
  29
+    respond_to do |format|
  30
+      format.html # new.html.erb
  31
+      format.xml  { render :xml => @payment }
  32
+    end
  33
+  end
  34
+
  35
+  # GET /payments/1/edit
  36
+  def edit
  37
+    @payment = Payment.find(params[:id])
  38
+  end
  39
+
  40
+  # POST /payments
  41
+  # POST /payments.xml
  42
+  def create
  43
+    @payment = Payment.new(params[:payment])
  44
+
  45
+    respond_to do |format|
  46
+      if @payment.save
  47
+        flash[:notice] = 'Payment was successfully created.'
  48
+        format.html { redirect_to(@payment) }
  49
+        format.xml  { render :xml => @payment, :status => :created, :location => @payment }
  50
+      else
  51
+        format.html { render :action => "new" }
  52
+        format.xml  { render :xml => @payment.errors, :status => :unprocessable_entity }
  53
+      end
  54
+    end
  55
+  end
  56
+
  57
+  # PUT /payments/1
  58
+  # PUT /payments/1.xml
  59
+  def update
  60
+    @payment = Payment.find(params[:id])
  61
+
  62
+    respond_to do |format|
  63
+      if @payment.update_attributes(params[:payment])
  64
+        flash[:notice] = 'Payment was successfully updated.'
  65
+        format.html { redirect_to(@payment) }
  66
+        format.xml  { head :ok }
  67
+      else
  68
+        format.html { render :action => "edit" }
  69
+        format.xml  { render :xml => @payment.errors, :status => :unprocessable_entity }
  70
+      end
  71
+    end
  72
+  end
  73
+
  74
+  # DELETE /payments/1
  75
+  # DELETE /payments/1.xml
  76
+  def destroy
  77
+    @payment = Payment.find(params[:id])
  78
+    @payment.destroy
  79
+
  80
+    respond_to do |format|
  81
+      format.html { redirect_to(payments_url) }
  82
+      format.xml  { head :ok }
  83
+    end
  84
+  end
  85
+end
85  app/controllers/reporters_controller.rb
... ...
@@ -0,0 +1,85 @@
  1
+class ReportersController < ApplicationController
  2
+  # GET /reporters
  3
+  # GET /reporters.xml
  4
+  def index
  5
+    @reporters = Reporter.find(:all)
  6
+
  7
+    respond_to do |format|
  8
+      format.html # index.html.erb
  9
+      format.xml  { render :xml => @reporters }
  10
+    end
  11
+  end
  12
+
  13
+  # GET /reporters/1
  14
+  # GET /reporters/1.xml
  15
+  def show
  16
+    @reporter = Reporter.find(params[:id])
  17
+
  18
+    respond_to do |format|
  19
+      format.html # show.html.erb
  20
+      format.xml  { render :xml => @reporter }
  21
+    end
  22
+  end
  23
+
  24
+  # GET /reporters/new
  25
+  # GET /reporters/new.xml
  26
+  def new
  27
+    @reporter = Reporter.new
  28
+
  29
+    respond_to do |format|
  30
+      format.html # new.html.erb
  31
+      format.xml  { render :xml => @reporter }
  32
+    end
  33
+  end
  34
+
  35
+  # GET /reporters/1/edit
  36
+  def edit
  37
+    @reporter = Reporter.find(params[:id])
  38
+  end
  39
+
  40
+  # POST /reporters
  41
+  # POST /reporters.xml
  42
+  def create
  43
+    @reporter = Reporter.new(params[:reporter])
  44
+
  45
+    respond_to do |format|
  46
+      if @reporter.save
  47
+        flash[:notice] = 'Reporter was successfully created.'
  48
+        format.html { redirect_to(@reporter) }
  49
+        format.xml  { render :xml => @reporter, :status => :created, :location => @reporter }
  50
+      else
  51
+        format.html { render :action => "new" }
  52
+        format.xml  { render :xml => @reporter.errors, :status => :unprocessable_entity }
  53
+      end
  54
+    end
  55
+  end
  56
+
  57
+  # PUT /reporters/1
  58
+  # PUT /reporters/1.xml
  59
+  def update
  60
+    @reporter = Reporter.find(params[:id])
  61
+
  62
+    respond_to do |format|
  63
+      if @reporter.update_attributes(params[:reporter])
  64
+        flash[:notice] = 'Reporter was successfully updated.'
  65
+        format.html { redirect_to(@reporter) }
  66
+        format.xml  { head :ok }
  67
+      else
  68
+        format.html { render :action => "edit" }
  69
+        format.xml  { render :xml => @reporter.errors, :status => :unprocessable_entity }