Permalink
Browse files

first commit

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

0 comments on commit f270a94

Please sign in to comment.