adherent 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +65 -0
- data/Rakefile +40 -0
- data/app/assets/images/adherent/cal.gif +0 -0
- data/app/assets/images/adherent/icones/afficher.png +0 -0
- data/app/assets/images/adherent/icones/detail.png +0 -0
- data/app/assets/images/adherent/icones/modifier.png +0 -0
- data/app/assets/images/adherent/icones/money-plus.png +0 -0
- data/app/assets/images/adherent/icones/navigation90.png +0 -0
- data/app/assets/images/adherent/icones/nouveau.png +0 -0
- data/app/assets/images/adherent/icones/payment.png +0 -0
- data/app/assets/images/adherent/icones/retour.png +0 -0
- data/app/assets/images/adherent/icones/supprimer.png +0 -0
- data/app/assets/javascripts/adherent/adhesion.js +2 -0
- data/app/assets/javascripts/adherent/application.js +16 -0
- data/app/assets/javascripts/adherent/bootstrap.js +2038 -0
- data/app/assets/javascripts/adherent/coords.js +2 -0
- data/app/assets/javascripts/adherent/date_picker.js +47 -0
- data/app/assets/javascripts/adherent/members.js +2 -0
- data/app/assets/javascripts/adherent/payments.js +2 -0
- data/app/assets/javascripts/adherent/reglements.js +2 -0
- data/app/assets/stylesheets/adherent/adhesion.css +4 -0
- data/app/assets/stylesheets/adherent/application.css +14 -0
- data/app/assets/stylesheets/adherent/bootstrap.css +5695 -0
- data/app/assets/stylesheets/adherent/coords.css +4 -0
- data/app/assets/stylesheets/adherent/date_picker.css +24 -0
- data/app/assets/stylesheets/adherent/jc_application.css.scss +121 -0
- data/app/assets/stylesheets/adherent/jcmenu.css +43 -0
- data/app/assets/stylesheets/adherent/layouts.css.scss +79 -0
- data/app/assets/stylesheets/adherent/members.css +7 -0
- data/app/assets/stylesheets/adherent/old_bootstrap.css +125 -0
- data/app/assets/stylesheets/adherent/payments.css +4 -0
- data/app/assets/stylesheets/adherent/reglements.css +4 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/adherent/adhesions_controller.rb +84 -0
- data/app/controllers/adherent/application_controller.rb +6 -0
- data/app/controllers/adherent/coords_controller.rb +100 -0
- data/app/controllers/adherent/members_controller.rb +89 -0
- data/app/controllers/adherent/payments_controller.rb +55 -0
- data/app/controllers/adherent/reglements_controller.rb +26 -0
- data/app/helpers/adherent/adhesion_helper.rb +4 -0
- data/app/helpers/adherent/application_helper.rb +21 -0
- data/app/helpers/adherent/coords_helper.rb +4 -0
- data/app/helpers/adherent/members_helper.rb +4 -0
- data/app/helpers/adherent/payments_helper.rb +14 -0
- data/app/helpers/adherent/reglements_helper.rb +4 -0
- data/app/models/adherent/adhesion.rb +75 -0
- data/app/models/adherent/coord.rb +7 -0
- data/app/models/adherent/member.rb +36 -0
- data/app/models/adherent/payment.rb +60 -0
- data/app/models/adherent/reglement.rb +7 -0
- data/app/views/adherent/adhesions/_form.html.haml +13 -0
- data/app/views/adherent/adhesions/edit.html.erb +12 -0
- data/app/views/adherent/adhesions/index.html.haml +27 -0
- data/app/views/adherent/adhesions/new.html.erb +13 -0
- data/app/views/adherent/adhesions/show.html.erb +2 -0
- data/app/views/adherent/coords/_form.html.erb +22 -0
- data/app/views/adherent/coords/edit.html.erb +16 -0
- data/app/views/adherent/coords/index.html.erb +55 -0
- data/app/views/adherent/coords/new.html.erb +12 -0
- data/app/views/adherent/coords/show.html.erb +50 -0
- data/app/views/adherent/members/_form.html.erb +20 -0
- data/app/views/adherent/members/edit.html.erb +16 -0
- data/app/views/adherent/members/index.html.erb +52 -0
- data/app/views/adherent/members/new.html.erb +12 -0
- data/app/views/adherent/members/show.html.erb +36 -0
- data/app/views/adherent/payments/_form.html.haml +12 -0
- data/app/views/adherent/payments/edit.html.erb +2 -0
- data/app/views/adherent/payments/index.html.haml +30 -0
- data/app/views/adherent/payments/new.html.erb +13 -0
- data/app/views/adherent/payments/show.html.erb +2 -0
- data/app/views/adherent/reglements/_form.html.haml +12 -0
- data/app/views/adherent/reglements/index.html.erb +2 -0
- data/app/views/adherent/reglements/new.html.erb +13 -0
- data/app/views/adherent/reglements/show.html.erb +2 -0
- data/app/views/layouts/adherent/_flash_partial.html.haml +9 -0
- data/app/views/layouts/adherent/application.html.erb +42 -0
- data/config/initializers/constants.rb +6 -0
- data/config/initializers/date_picker_input.rb +39 -0
- data/config/initializers/pick_date_extension.rb +63 -0
- data/config/initializers/simple_form.rb +180 -0
- data/config/locales/fr.yml +222 -0
- data/config/locales/simple_form.fr.yml +59 -0
- data/config/locales/traduc.yml +9 -0
- data/config/routes.rb +22 -0
- data/db/migrate/20130805145522_create_adherent_members.rb +12 -0
- data/db/migrate/20130805152911_create_adherent_coords.rb +16 -0
- data/db/migrate/20130806053936_create_adherent_adhesions.rb +14 -0
- data/db/migrate/20130808054023_create_adherent_payments.rb +17 -0
- data/db/migrate/20130809052125_create_adherent_reglements.rb +13 -0
- data/db/migrate/20130810073908_add_organism_id_to_adherent_members.rb +5 -0
- data/lib/adherent/engine.rb +10 -0
- data/lib/adherent/version.rb +3 -0
- data/lib/adherent.rb +15 -0
- data/lib/tasks/adherent_tasks.rake +4 -0
- data/lib/templates/erb/scaffold/_form.html.erb +17 -0
- data/lib/templates/erb/scaffold/edit.html.erb +16 -0
- data/lib/templates/erb/scaffold/index.html.erb +36 -0
- data/lib/templates/erb/scaffold/new.html.erb +12 -0
- data/lib/templates/erb/scaffold/show.html.erb +22 -0
- data/test/adherent_test.rb +7 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +16 -0
- data/test/dummy/app/assets/javascripts/organisms.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +14 -0
- data/test/dummy/app/assets/stylesheets/organisms.css +4 -0
- data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
- data/test/dummy/app/controllers/application_controller.rb +16 -0
- data/test/dummy/app/controllers/organisms_controller.rb +86 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/organisms_helper.rb +2 -0
- data/test/dummy/app/models/organism.rb +5 -0
- data/test/dummy/app/views/layouts/application.html.erb +16 -0
- data/test/dummy/app/views/organisms/_form.html.haml +16 -0
- data/test/dummy/app/views/organisms/edit.html.haml +7 -0
- data/test/dummy/app/views/organisms/index.html.haml +21 -0
- data/test/dummy/app/views/organisms/new.html.haml +5 -0
- data/test/dummy/app/views/organisms/show.html.haml +14 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +55 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/locales/fr.yml +221 -0
- data/test/dummy/config/locales/simple_form.en.yml +26 -0
- data/test/dummy/config/routes.rb +9 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/migrate/20130810074112_create_organisms.rb +10 -0
- data/test/dummy/db/migrate/20130810081835_create_adherent_members.adherent.rb +13 -0
- data/test/dummy/db/migrate/20130810081836_create_adherent_coords.adherent.rb +17 -0
- data/test/dummy/db/migrate/20130810081837_create_adherent_adhesions.adherent.rb +15 -0
- data/test/dummy/db/migrate/20130810081838_create_adherent_payments.adherent.rb +18 -0
- data/test/dummy/db/migrate/20130810081839_create_adherent_reglements.adherent.rb +14 -0
- data/test/dummy/db/migrate/20130810081840_add_organism_id_to_adherent_members.adherent.rb +6 -0
- data/test/dummy/db/schema.rb +79 -0
- data/test/dummy/log/development.log +90832 -0
- data/test/dummy/log/test.log +4951 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/organisms.yml +9 -0
- data/test/dummy/test/functional/organisms_controller_test.rb +49 -0
- data/test/dummy/test/unit/helpers/organisms_helper_test.rb +4 -0
- data/test/dummy/test/unit/organism_test.rb +7 -0
- data/test/dummy/tmp/cache/assets/C44/670/sprockets%2Fe128312dd259094d00196a3f02f41819 +0 -0
- data/test/dummy/tmp/cache/assets/C4D/C10/sprockets%2Fe52bf847776498593423b635698c989c +0 -0
- data/test/dummy/tmp/cache/assets/C53/BA0/sprockets%2F0701319e027b68d87b4d5727aa571973 +0 -0
- data/test/dummy/tmp/cache/assets/C72/FD0/sprockets%2F211ada252149520831dc97669a2e3d70 +0 -0
- data/test/dummy/tmp/cache/assets/C8B/B50/sprockets%2F1bf0946089435ce76a87bd41668373c2 +0 -0
- data/test/dummy/tmp/cache/assets/C8C/B80/sprockets%2F371bf96e99717688ed7313a0c53f4212 +0 -0
- data/test/dummy/tmp/cache/assets/C8D/BD0/sprockets%2F947d70d3406792779a12f1f6d39d1b91 +0 -0
- data/test/dummy/tmp/cache/assets/C90/510/sprockets%2Ff5920073f4480657faac32986b1f8587 +0 -0
- data/test/dummy/tmp/cache/assets/C91/5E0/sprockets%2F28a1436ca683918e98c79266d19d430e +0 -0
- data/test/dummy/tmp/cache/assets/CA0/DB0/sprockets%2F0333b2531e81b27b06c6f2829c6ab652 +0 -0
- data/test/dummy/tmp/cache/assets/CA2/E80/sprockets%2F332a13206d3e2013aaed55e54759f872 +0 -0
- data/test/dummy/tmp/cache/assets/CA4/930/sprockets%2F72a29d61339a55b21d1ac7ec59153244 +0 -0
- data/test/dummy/tmp/cache/assets/CA6/0A0/sprockets%2F63a72244bdf73521f399e501b341d16d +0 -0
- data/test/dummy/tmp/cache/assets/CA7/320/sprockets%2Ff20811f6c383aaf0958051fb829b3602 +0 -0
- data/test/dummy/tmp/cache/assets/CA9/F70/sprockets%2Fc82873599ca5d451407d1a58340ada23 +0 -0
- data/test/dummy/tmp/cache/assets/CAB/880/sprockets%2F3b58d34232750b28494eca3b6d7339a3 +0 -0
- data/test/dummy/tmp/cache/assets/CAD/BF0/sprockets%2Fd27d4e6bd84d0108fc54a21959181335 +0 -0
- data/test/dummy/tmp/cache/assets/CB1/900/sprockets%2F98768e5681d06ecae10153b850f22a64 +0 -0
- data/test/dummy/tmp/cache/assets/CC3/320/sprockets%2F6a1d777559c0368a3f41c28e9c358e58 +0 -0
- data/test/dummy/tmp/cache/assets/CC6/700/sprockets%2Fda996593aa3789391cab3d7762f13687 +0 -0
- data/test/dummy/tmp/cache/assets/CCB/400/sprockets%2Fb211324ce679335840009b6a2aa45cfc +0 -0
- data/test/dummy/tmp/cache/assets/CCC/450/sprockets%2F731d1832138b08d76d54530d0ea53abb +0 -0
- data/test/dummy/tmp/cache/assets/CD6/8A0/sprockets%2Fcb476833cd1a806e251da407a58d9520 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CD9/5A0/sprockets%2Fda84ff5dc1009f2b281035256a7812d9 +0 -0
- data/test/dummy/tmp/cache/assets/CDC/0B0/sprockets%2Ffef07c3c165353f861564ede180350a4 +0 -0
- data/test/dummy/tmp/cache/assets/CDD/EB0/sprockets%2F0e17703d917f6560e5c3b46ae85c09a2 +0 -0
- data/test/dummy/tmp/cache/assets/CE0/B90/sprockets%2F7baa8d092b9d409d47643521a8b55e62 +0 -0
- data/test/dummy/tmp/cache/assets/CE1/EB0/sprockets%2Fe2d34e55c19309ae4d1b8628d38514c6 +0 -0
- data/test/dummy/tmp/cache/assets/CE2/7C0/sprockets%2F1e3db2275be13ee98084d607564816bd +0 -0
- data/test/dummy/tmp/cache/assets/CE4/B80/sprockets%2Fdc146f8d1ff283ff045000f8349e3942 +0 -0
- data/test/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2 +0 -0
- data/test/dummy/tmp/cache/assets/CFA/700/sprockets%2Ff51725f304c66b6ed8ab01120cb1a593 +0 -0
- data/test/dummy/tmp/cache/assets/D0B/520/sprockets%2Fa659c61ab2078241e32ebaf671f87e41 +0 -0
- data/test/dummy/tmp/cache/assets/D0D/CC0/sprockets%2F90fc5652fe6161075680fcd4cd0c45d2 +0 -0
- data/test/dummy/tmp/cache/assets/D13/D30/sprockets%2Ff9d616cf2293e4f2ffe53f181410e523 +0 -0
- data/test/dummy/tmp/cache/assets/D14/210/sprockets%2Fb5db5427cdef8d152ae598d461178026 +0 -0
- data/test/dummy/tmp/cache/assets/D15/960/sprockets%2F557c56f5b8b86ba772e07281f1f3a0c7 +0 -0
- data/test/dummy/tmp/cache/assets/D16/870/sprockets%2F3f2a439772fcd9cd0f434f723837ae51 +0 -0
- data/test/dummy/tmp/cache/assets/D16/D00/sprockets%2F52e940c5c1d8089bcdf984d4d27c5520 +0 -0
- data/test/dummy/tmp/cache/assets/D17/680/sprockets%2Fa71f8f0bb597e3648d18d972aad62604 +0 -0
- data/test/dummy/tmp/cache/assets/D1A/390/sprockets%2F1d08a6978a059fa2494e078ec1ac7e93 +0 -0
- data/test/dummy/tmp/cache/assets/D1A/820/sprockets%2F20a218b05c2726d14bd025c36ba31ddd +0 -0
- data/test/dummy/tmp/cache/assets/D1A/D90/sprockets%2F6c459fd8844374d4aa166c64f544fae0 +0 -0
- data/test/dummy/tmp/cache/assets/D20/590/sprockets%2F22948c5cb4a59a4c252888f75cdf387a +0 -0
- data/test/dummy/tmp/cache/assets/D25/100/sprockets%2F4b9f1fdc6f9b86cc0624a7951766d926 +0 -0
- data/test/dummy/tmp/cache/assets/D25/C20/sprockets%2F1371c7975696fb3bbb964454c1ddff97 +0 -0
- data/test/dummy/tmp/cache/assets/D27/980/sprockets%2F65718e7a65fd89199b02b7cd38b90be9 +0 -0
- data/test/dummy/tmp/cache/assets/D2A/220/sprockets%2Fb0d6ff4608e402650ca685bc013d5d0a +0 -0
- data/test/dummy/tmp/cache/assets/D2B/FA0/sprockets%2F32aa9ce8b2315cc01f8a2c27374215ce +0 -0
- data/test/dummy/tmp/cache/assets/D32/5D0/sprockets%2F3acc8697202c55974ff0122bcf20fa2b +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D37/CF0/sprockets%2Fb1fa058e880dd6bc8dc0704b26a44096 +0 -0
- data/test/dummy/tmp/cache/assets/D3E/7A0/sprockets%2Ff9a1dbe464c536a11de32284fbc89192 +0 -0
- data/test/dummy/tmp/cache/assets/D3F/640/sprockets%2F9b448668c4c3a12d6aaa017b94e69ed2 +0 -0
- data/test/dummy/tmp/cache/assets/D42/040/sprockets%2F3def97f4406db752008fa340f74a6e3f +0 -0
- data/test/dummy/tmp/cache/assets/D44/860/sprockets%2F9157a652853bd3cea861bd767fed0b08 +0 -0
- data/test/dummy/tmp/cache/assets/D44/BF0/sprockets%2Fcf34626c45538b36718fd50fa9bcb2e6 +0 -0
- data/test/dummy/tmp/cache/assets/D45/2A0/sprockets%2F9c55f3eca763e68ded31023b7f66543a +0 -0
- data/test/dummy/tmp/cache/assets/D48/B20/sprockets%2F5768e2da329c68c958acde5d26124de0 +0 -0
- data/test/dummy/tmp/cache/assets/D48/FD0/sprockets%2F4403ce85c7fe84fe60d426553aa99b1f +0 -0
- data/test/dummy/tmp/cache/assets/D4B/710/sprockets%2F41e4ac5488184198d7e33e18b7aece4f +0 -0
- data/test/dummy/tmp/cache/assets/D4B/C40/sprockets%2F2428f6c76bb4a5efb583e158681fb73d +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D50/4F0/sprockets%2F06489ea52ac1bf5ebb888f5b8c719268 +0 -0
- data/test/dummy/tmp/cache/assets/D51/560/sprockets%2Ff6c8347aff37a4784ea82069ba176f5f +0 -0
- data/test/dummy/tmp/cache/assets/D56/090/sprockets%2F4af17d268e2ffe72af8a78b78811f666 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D5F/600/sprockets%2F9c4623e57da4d15adb71bd1b04188b1d +0 -0
- data/test/dummy/tmp/cache/assets/D5F/950/sprockets%2F083e58aaae13ddb213d627c950dc2d09 +0 -0
- data/test/dummy/tmp/cache/assets/D63/7A0/sprockets%2Fa0d549181d4ba25b5ed57b841efc2d14 +0 -0
- data/test/dummy/tmp/cache/assets/D68/100/sprockets%2F7d7522df5cd3ba1f22c81c653dd5d651 +0 -0
- data/test/dummy/tmp/cache/assets/D6A/5C0/sprockets%2F9b410af44867a4979d1aea0ab84ed24b +0 -0
- data/test/dummy/tmp/cache/assets/D6B/970/sprockets%2F214e29a7345faee9672bca1756e4aaf1 +0 -0
- data/test/dummy/tmp/cache/assets/D6B/D20/sprockets%2Fee6531726dfe6592fa84b42a420b6acd +0 -0
- data/test/dummy/tmp/cache/assets/D70/650/sprockets%2Fe9a55b9e2e492638448a622c2fc0bfab +0 -0
- data/test/dummy/tmp/cache/assets/D71/AF0/sprockets%2Fb289e7b3562dcfd42bd0957f27a2f52a +0 -0
- data/test/dummy/tmp/cache/assets/D73/0F0/sprockets%2F5ba6d2f108d33e64b84fc4dd91960d6e +0 -0
- data/test/dummy/tmp/cache/assets/D73/8B0/sprockets%2Fac0e6a1f5b87c2966f07864c89c0acc3 +0 -0
- data/test/dummy/tmp/cache/assets/D79/640/sprockets%2F7443c25f3c67c8dae8e5ee1b1df18853 +0 -0
- data/test/dummy/tmp/cache/assets/D7B/800/sprockets%2F850d92cf676cc2c2c662ee8dc328f82c +0 -0
- data/test/dummy/tmp/cache/assets/D7D/950/sprockets%2F8259f3fc885403b4eea8dd12964c2ffc +0 -0
- data/test/dummy/tmp/cache/assets/D80/5F0/sprockets%2F375f5ed76dd35537dbe20d7f597ed06c +0 -0
- data/test/dummy/tmp/cache/assets/D92/430/sprockets%2Fc55e2bbc3d3c5566893be021ec1c4ab7 +0 -0
- data/test/dummy/tmp/cache/assets/D98/DB0/sprockets%2F85d986b72de37b417ec3a1a8e0da5aa1 +0 -0
- data/test/dummy/tmp/cache/assets/D9A/810/sprockets%2F53a9bd5325fcfa4148c273e3deb2d19d +0 -0
- data/test/dummy/tmp/cache/assets/D9D/BA0/sprockets%2Fa3a3f78f8e854339e32a5ab0638abbbf +0 -0
- data/test/dummy/tmp/cache/assets/DA7/930/sprockets%2F06db55d1b7d0c96a4ff1657e169e6ece +0 -0
- data/test/dummy/tmp/cache/assets/DA8/0D0/sprockets%2F74dcf71bbdf4ad56a3b4338b93d9866c +0 -0
- data/test/dummy/tmp/cache/assets/DAD/860/sprockets%2F11e875f5b7f7f5efbad0f6b5f880e244 +0 -0
- data/test/dummy/tmp/cache/assets/DAD/8E0/sprockets%2F498547cbaefbf040cfff05e9c6e53386 +0 -0
- data/test/dummy/tmp/cache/assets/DB0/A80/sprockets%2F9fdb8e951f975dae3836c2ccf0f65a34 +0 -0
- data/test/dummy/tmp/cache/assets/DC1/9E0/sprockets%2F4fdc113ba37308cc3d7d2dbbe1e9d625 +0 -0
- data/test/dummy/tmp/cache/assets/DCC/170/sprockets%2Fa2b9a6a717a82fc483c94abbe71aa95f +0 -0
- data/test/dummy/tmp/cache/assets/DCD/870/sprockets%2F26f53f256948ecabba69abf1e1dea282 +0 -0
- data/test/dummy/tmp/cache/assets/DD4/350/sprockets%2Fdb9283bc185ba79f4e69ffcf1214d3ac +0 -0
- data/test/dummy/tmp/cache/assets/DD4/980/sprockets%2Fed1289bfd5270a38bd9adfcb8d0627c8 +0 -0
- data/test/dummy/tmp/cache/assets/DD7/110/sprockets%2Fa7626606dec6ffd4a8a4b76abb7f6a94 +0 -0
- data/test/dummy/tmp/cache/assets/DD7/2D0/sprockets%2F9f68c831ccc33f95a6b0a5d7aaf76d8a +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/DE5/930/sprockets%2Fdf7e1e4d508705c77a96e8deb9d8cf4a +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E06/3E0/sprockets%2Fea82cc4edce5d77b1a6919e2ce267c5e +0 -0
- data/test/dummy/tmp/cache/assets/E09/D50/sprockets%2Ff4ddcae783285dd8fc1d36e118c8cb7d +0 -0
- data/test/dummy/tmp/cache/assets/E12/820/sprockets%2Ff8ced48d293d9ae81be776bac3d3de86 +0 -0
- data/test/dummy/tmp/cache/assets/E5A/2A0/sprockets%2Fed33dc2e47cddca2a7f3b9d850f01fef +0 -0
- data/test/dummy/tmp/cache/assets/E5A/610/sprockets%2Fca00ee89118a5de9af36a4df9a2eddda +0 -0
- data/test/dummy/tmp/cache/assets/E8E/C80/sprockets%2Fbcfe97b68b37db0b902decd4ea5ae8ea +0 -0
- data/test/fixtures/adherent/adhesions.yml +11 -0
- data/test/fixtures/adherent/coords.yml +21 -0
- data/test/fixtures/adherent/members.yml +13 -0
- data/test/fixtures/adherent/payments.yml +22 -0
- data/test/fixtures/adherent/reglements.yml +11 -0
- data/test/functional/adherent/adhesion_controller_test.rb +26 -0
- data/test/functional/adherent/coords_controller_test.rb +53 -0
- data/test/functional/adherent/members_controller_test.rb +54 -0
- data/test/functional/adherent/payments_controller_test.rb +26 -0
- data/test/functional/adherent/reglements_controller_test.rb +21 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +27 -0
- data/test/unit/adherent/adhesion_test.rb +35 -0
- data/test/unit/adherent/coord_test.rb +9 -0
- data/test/unit/adherent/member_test.rb +17 -0
- data/test/unit/adherent/payment_test.rb +24 -0
- data/test/unit/adherent/reglement_test.rb +9 -0
- data/test/unit/helpers/adherent/adhesion_helper_test.rb +6 -0
- data/test/unit/helpers/adherent/coords_helper_test.rb +6 -0
- data/test/unit/helpers/adherent/members_helper_test.rb +6 -0
- data/test/unit/helpers/adherent/payments_helper_test.rb +6 -0
- data/test/unit/helpers/adherent/reglements_helper_test.rb +6 -0
- metadata +627 -0
@@ -0,0 +1,261 @@
|
|
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"
|
7
|
+
templates that are primarily responsible for inserting pre-built data in between
|
8
|
+
HTML tags. The model contains the "smart" domain objects (such as Account,
|
9
|
+
Product, Person, Post) that holds all the business logic and knows how to
|
10
|
+
persist themselves to a database. The controller handles the incoming requests
|
11
|
+
(such as Save New Account, Update Product, Show Post) by manipulating the model
|
12
|
+
and directing data to the view.
|
13
|
+
|
14
|
+
In Rails, the model is handled by what's called an object-relational mapping
|
15
|
+
layer entitled Active Record. This layer allows you to present the data from
|
16
|
+
database rows as objects and embellish these data objects with business logic
|
17
|
+
methods. You can read more about Active Record in
|
18
|
+
link:files/vendor/rails/activerecord/README.html.
|
19
|
+
|
20
|
+
The controller and view are handled by the Action Pack, which handles both
|
21
|
+
layers by its two parts: Action View and Action Controller. These two layers
|
22
|
+
are bundled in a single package due to their heavy interdependence. This is
|
23
|
+
unlike the relationship between the Active Record and Action Pack that is much
|
24
|
+
more separate. Each of these packages can be used independently outside of
|
25
|
+
Rails. You can read more about Action Pack in
|
26
|
+
link:files/vendor/rails/actionpack/README.html.
|
27
|
+
|
28
|
+
|
29
|
+
== Getting Started
|
30
|
+
|
31
|
+
1. At the command prompt, create a new Rails application:
|
32
|
+
<tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
|
33
|
+
|
34
|
+
2. Change directory to <tt>myapp</tt> and start the web server:
|
35
|
+
<tt>cd myapp; rails server</tt> (run with --help for options)
|
36
|
+
|
37
|
+
3. Go to http://localhost:3000/ and you'll see:
|
38
|
+
"Welcome aboard: You're riding Ruby on Rails!"
|
39
|
+
|
40
|
+
4. Follow the guidelines to start developing your application. You can find
|
41
|
+
the following resources handy:
|
42
|
+
|
43
|
+
* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
|
44
|
+
* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
|
45
|
+
|
46
|
+
|
47
|
+
== Debugging Rails
|
48
|
+
|
49
|
+
Sometimes your application goes wrong. Fortunately there are a lot of tools that
|
50
|
+
will help you debug it and get it back on the rails.
|
51
|
+
|
52
|
+
First area to check is the application log files. Have "tail -f" commands
|
53
|
+
running on the server.log and development.log. Rails will automatically display
|
54
|
+
debugging and runtime information to these files. Debugging info will also be
|
55
|
+
shown in the browser on requests from 127.0.0.1.
|
56
|
+
|
57
|
+
You can also log your own messages directly into the log file from your code
|
58
|
+
using the Ruby logger class from inside your controllers. Example:
|
59
|
+
|
60
|
+
class WeblogController < ActionController::Base
|
61
|
+
def destroy
|
62
|
+
@weblog = Weblog.find(params[:id])
|
63
|
+
@weblog.destroy
|
64
|
+
logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
The result will be a message in your log file along the lines of:
|
69
|
+
|
70
|
+
Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
|
71
|
+
|
72
|
+
More information on how to use the logger is at http://www.ruby-doc.org/core/
|
73
|
+
|
74
|
+
Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
|
75
|
+
several books available online as well:
|
76
|
+
|
77
|
+
* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
|
78
|
+
* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
|
79
|
+
|
80
|
+
These two books will bring you up to speed on the Ruby language and also on
|
81
|
+
programming in general.
|
82
|
+
|
83
|
+
|
84
|
+
== Debugger
|
85
|
+
|
86
|
+
Debugger support is available through the debugger command when you start your
|
87
|
+
Mongrel or WEBrick server with --debugger. This means that you can break out of
|
88
|
+
execution at any point in the code, investigate and change the model, and then,
|
89
|
+
resume execution! You need to install ruby-debug to run the server in debugging
|
90
|
+
mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
|
91
|
+
|
92
|
+
class WeblogController < ActionController::Base
|
93
|
+
def index
|
94
|
+
@posts = Post.all
|
95
|
+
debugger
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
So the controller will accept the action, run the first line, then present you
|
100
|
+
with a IRB prompt in the server window. Here you can do things like:
|
101
|
+
|
102
|
+
>> @posts.inspect
|
103
|
+
=> "[#<Post:0x14a6be8
|
104
|
+
@attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
|
105
|
+
#<Post:0x14a6620
|
106
|
+
@attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
|
107
|
+
>> @posts.first.title = "hello from a debugger"
|
108
|
+
=> "hello from a debugger"
|
109
|
+
|
110
|
+
...and even better, you can examine how your runtime objects actually work:
|
111
|
+
|
112
|
+
>> f = @posts.first
|
113
|
+
=> #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
|
114
|
+
>> f.
|
115
|
+
Display all 152 possibilities? (y or n)
|
116
|
+
|
117
|
+
Finally, when you're ready to resume execution, you can enter "cont".
|
118
|
+
|
119
|
+
|
120
|
+
== Console
|
121
|
+
|
122
|
+
The console is a Ruby shell, which allows you to interact with your
|
123
|
+
application's domain model. Here you'll have all parts of the application
|
124
|
+
configured, just like it is when the application is running. You can inspect
|
125
|
+
domain models, change values, and save to the database. Starting the script
|
126
|
+
without arguments will launch it in the development environment.
|
127
|
+
|
128
|
+
To start the console, run <tt>rails console</tt> from the application
|
129
|
+
directory.
|
130
|
+
|
131
|
+
Options:
|
132
|
+
|
133
|
+
* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
|
134
|
+
made to the database.
|
135
|
+
* Passing an environment name as an argument will load the corresponding
|
136
|
+
environment. Example: <tt>rails console production</tt>.
|
137
|
+
|
138
|
+
To reload your controllers and models after launching the console run
|
139
|
+
<tt>reload!</tt>
|
140
|
+
|
141
|
+
More information about irb can be found at:
|
142
|
+
link:http://www.rubycentral.org/pickaxe/irb.html
|
143
|
+
|
144
|
+
|
145
|
+
== dbconsole
|
146
|
+
|
147
|
+
You can go to the command line of your database directly through <tt>rails
|
148
|
+
dbconsole</tt>. You would be connected to the database with the credentials
|
149
|
+
defined in database.yml. Starting the script without arguments will connect you
|
150
|
+
to the development database. Passing an argument will connect you to a different
|
151
|
+
database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
|
152
|
+
PostgreSQL and SQLite 3.
|
153
|
+
|
154
|
+
== Description of Contents
|
155
|
+
|
156
|
+
The default directory structure of a generated Ruby on Rails application:
|
157
|
+
|
158
|
+
|-- app
|
159
|
+
| |-- assets
|
160
|
+
| | |-- images
|
161
|
+
| | |-- javascripts
|
162
|
+
| | `-- stylesheets
|
163
|
+
| |-- controllers
|
164
|
+
| |-- helpers
|
165
|
+
| |-- mailers
|
166
|
+
| |-- models
|
167
|
+
| `-- views
|
168
|
+
| `-- layouts
|
169
|
+
|-- config
|
170
|
+
| |-- environments
|
171
|
+
| |-- initializers
|
172
|
+
| `-- locales
|
173
|
+
|-- db
|
174
|
+
|-- doc
|
175
|
+
|-- lib
|
176
|
+
| |-- assets
|
177
|
+
| `-- tasks
|
178
|
+
|-- log
|
179
|
+
|-- public
|
180
|
+
|-- script
|
181
|
+
|-- test
|
182
|
+
| |-- fixtures
|
183
|
+
| |-- functional
|
184
|
+
| |-- integration
|
185
|
+
| |-- performance
|
186
|
+
| `-- unit
|
187
|
+
|-- tmp
|
188
|
+
| `-- cache
|
189
|
+
| `-- assets
|
190
|
+
`-- vendor
|
191
|
+
|-- assets
|
192
|
+
| |-- javascripts
|
193
|
+
| `-- stylesheets
|
194
|
+
`-- plugins
|
195
|
+
|
196
|
+
app
|
197
|
+
Holds all the code that's specific to this particular application.
|
198
|
+
|
199
|
+
app/assets
|
200
|
+
Contains subdirectories for images, stylesheets, and JavaScript files.
|
201
|
+
|
202
|
+
app/controllers
|
203
|
+
Holds controllers that should be named like weblogs_controller.rb for
|
204
|
+
automated URL mapping. All controllers should descend from
|
205
|
+
ApplicationController which itself descends from ActionController::Base.
|
206
|
+
|
207
|
+
app/models
|
208
|
+
Holds models that should be named like post.rb. Models descend from
|
209
|
+
ActiveRecord::Base by default.
|
210
|
+
|
211
|
+
app/views
|
212
|
+
Holds the template files for the view that should be named like
|
213
|
+
weblogs/index.html.erb for the WeblogsController#index action. All views use
|
214
|
+
eRuby syntax by default.
|
215
|
+
|
216
|
+
app/views/layouts
|
217
|
+
Holds the template files for layouts to be used with views. This models the
|
218
|
+
common header/footer method of wrapping views. In your views, define a layout
|
219
|
+
using the <tt>layout :default</tt> and create a file named default.html.erb.
|
220
|
+
Inside default.html.erb, call <% yield %> to render the view using this
|
221
|
+
layout.
|
222
|
+
|
223
|
+
app/helpers
|
224
|
+
Holds view helpers that should be named like weblogs_helper.rb. These are
|
225
|
+
generated for you automatically when using generators for controllers.
|
226
|
+
Helpers can be used to wrap functionality for your views into methods.
|
227
|
+
|
228
|
+
config
|
229
|
+
Configuration files for the Rails environment, the routing map, the database,
|
230
|
+
and other dependencies.
|
231
|
+
|
232
|
+
db
|
233
|
+
Contains the database schema in schema.rb. db/migrate contains all the
|
234
|
+
sequence of Migrations for your schema.
|
235
|
+
|
236
|
+
doc
|
237
|
+
This directory is where your application documentation will be stored when
|
238
|
+
generated using <tt>rake doc:app</tt>
|
239
|
+
|
240
|
+
lib
|
241
|
+
Application specific libraries. Basically, any kind of custom code that
|
242
|
+
doesn't belong under controllers, models, or helpers. This directory is in
|
243
|
+
the load path.
|
244
|
+
|
245
|
+
public
|
246
|
+
The directory available for the web server. Also contains the dispatchers and the
|
247
|
+
default HTML files. This should be set as the DOCUMENT_ROOT of your web
|
248
|
+
server.
|
249
|
+
|
250
|
+
script
|
251
|
+
Helper scripts for automation and generation.
|
252
|
+
|
253
|
+
test
|
254
|
+
Unit and functional tests along with fixtures. When using the rails generate
|
255
|
+
command, template test files will be generated for you and placed in this
|
256
|
+
directory.
|
257
|
+
|
258
|
+
vendor
|
259
|
+
External libraries that the application depends on. Also includes the plugins
|
260
|
+
subdirectory. If the app has frozen rails, those gems also go here, under
|
261
|
+
vendor/rails/. This directory is in the load path.
|
data/test/dummy/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery.ui.datepicker
|
15
|
+
//= require jquery_ujs
|
16
|
+
//= require_tree .
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require jquery.ui.datepicker
|
13
|
+
*= require_tree .
|
14
|
+
*/
|
@@ -0,0 +1,56 @@
|
|
1
|
+
body { background-color: #fff; color: #333; }
|
2
|
+
|
3
|
+
body, p, ol, ul, td {
|
4
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
5
|
+
font-size: 13px;
|
6
|
+
line-height: 18px;
|
7
|
+
}
|
8
|
+
|
9
|
+
pre {
|
10
|
+
background-color: #eee;
|
11
|
+
padding: 10px;
|
12
|
+
font-size: 11px;
|
13
|
+
}
|
14
|
+
|
15
|
+
a { color: #000; }
|
16
|
+
a:visited { color: #666; }
|
17
|
+
a:hover { color: #fff; background-color:#000; }
|
18
|
+
|
19
|
+
div.field, div.actions {
|
20
|
+
margin-bottom: 10px;
|
21
|
+
}
|
22
|
+
|
23
|
+
#notice {
|
24
|
+
color: green;
|
25
|
+
}
|
26
|
+
|
27
|
+
.field_with_errors {
|
28
|
+
padding: 2px;
|
29
|
+
background-color: red;
|
30
|
+
display: table;
|
31
|
+
}
|
32
|
+
|
33
|
+
#error_explanation {
|
34
|
+
width: 450px;
|
35
|
+
border: 2px solid red;
|
36
|
+
padding: 7px;
|
37
|
+
padding-bottom: 0;
|
38
|
+
margin-bottom: 20px;
|
39
|
+
background-color: #f0f0f0;
|
40
|
+
}
|
41
|
+
|
42
|
+
#error_explanation h2 {
|
43
|
+
text-align: left;
|
44
|
+
font-weight: bold;
|
45
|
+
padding: 5px 5px 5px 15px;
|
46
|
+
font-size: 12px;
|
47
|
+
margin: -7px;
|
48
|
+
margin-bottom: 0px;
|
49
|
+
background-color: #c00;
|
50
|
+
color: #fff;
|
51
|
+
}
|
52
|
+
|
53
|
+
#error_explanation ul li {
|
54
|
+
font-size: 12px;
|
55
|
+
list-style: square;
|
56
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class ApplicationController < ActionController::Base
|
2
|
+
protect_from_forgery
|
3
|
+
|
4
|
+
before_filter :find_organism
|
5
|
+
|
6
|
+
protected
|
7
|
+
|
8
|
+
def find_organism
|
9
|
+
if session[:organism]
|
10
|
+
@organism = Organism.find_by_id(session[:organism])
|
11
|
+
else
|
12
|
+
flash[:alert] = 'Vous devez d\'abord choisir un organisme'
|
13
|
+
redirect_to main_app.organisms_path
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
class OrganismsController < ApplicationController
|
2
|
+
|
3
|
+
skip_before_filter :find_organism
|
4
|
+
|
5
|
+
# GET /organisms
|
6
|
+
# GET /organisms.json
|
7
|
+
def index
|
8
|
+
@organisms = Organism.all
|
9
|
+
|
10
|
+
respond_to do |format|
|
11
|
+
format.html # index.html.erb
|
12
|
+
format.json { render json: @organisms }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
# GET /organisms/1
|
17
|
+
# GET /organisms/1.json
|
18
|
+
def show
|
19
|
+
@organism = Organism.find(params[:id])
|
20
|
+
session[:organism] = @organism.id
|
21
|
+
respond_to do |format|
|
22
|
+
format.html # show.html.erb
|
23
|
+
format.json { render json: @organism }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# GET /organisms/new
|
28
|
+
# GET /organisms/new.json
|
29
|
+
def new
|
30
|
+
@organism = Organism.new
|
31
|
+
|
32
|
+
respond_to do |format|
|
33
|
+
format.html # new.html.erb
|
34
|
+
format.json { render json: @organism }
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# GET /organisms/1/edit
|
39
|
+
def edit
|
40
|
+
@organism = Organism.find(params[:id])
|
41
|
+
end
|
42
|
+
|
43
|
+
# POST /organisms
|
44
|
+
# POST /organisms.json
|
45
|
+
def create
|
46
|
+
@organism = Organism.new(params[:organism])
|
47
|
+
|
48
|
+
respond_to do |format|
|
49
|
+
if @organism.save
|
50
|
+
format.html { redirect_to @organism, notice: 'Organism was successfully created.' }
|
51
|
+
format.json { render json: @organism, status: :created, location: @organism }
|
52
|
+
else
|
53
|
+
format.html { render action: "new" }
|
54
|
+
format.json { render json: @organism.errors, status: :unprocessable_entity }
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# PUT /organisms/1
|
60
|
+
# PUT /organisms/1.json
|
61
|
+
def update
|
62
|
+
@organism = Organism.find(params[:id])
|
63
|
+
|
64
|
+
respond_to do |format|
|
65
|
+
if @organism.update_attributes(params[:organism])
|
66
|
+
format.html { redirect_to @organism, notice: 'Organism was successfully updated.' }
|
67
|
+
format.json { head :no_content }
|
68
|
+
else
|
69
|
+
format.html { render action: "edit" }
|
70
|
+
format.json { render json: @organism.errors, status: :unprocessable_entity }
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# DELETE /organisms/1
|
76
|
+
# DELETE /organisms/1.json
|
77
|
+
def destroy
|
78
|
+
@organism = Organism.find(params[:id])
|
79
|
+
@organism.destroy
|
80
|
+
|
81
|
+
respond_to do |format|
|
82
|
+
format.html { redirect_to organisms_url }
|
83
|
+
format.json { head :no_content }
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag "application", :media => "all" %>
|
6
|
+
<%= javascript_include_tag "application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<strong><%= flash[:notice] %></strong>
|
11
|
+
<strong><%= flash[:alert] %></strong>
|
12
|
+
|
13
|
+
<%= yield %>
|
14
|
+
|
15
|
+
</body>
|
16
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
= form_for @organism do |f|
|
2
|
+
- if @organism.errors.any?
|
3
|
+
#error_explanation
|
4
|
+
%h2= "#{pluralize(@organism.errors.count, "error")} prohibited this organism from being saved:"
|
5
|
+
%ul
|
6
|
+
- @organism.errors.full_messages.each do |msg|
|
7
|
+
%li= msg
|
8
|
+
|
9
|
+
.field
|
10
|
+
= f.label :title
|
11
|
+
= f.text_field :title
|
12
|
+
.field
|
13
|
+
= f.label :status
|
14
|
+
= f.text_field :status
|
15
|
+
.actions
|
16
|
+
= f.submit 'Save'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
%h1 Listing organisms
|
2
|
+
|
3
|
+
%table
|
4
|
+
%tr
|
5
|
+
%th Title
|
6
|
+
%th Status
|
7
|
+
%th
|
8
|
+
%th
|
9
|
+
%th
|
10
|
+
|
11
|
+
- @organisms.each do |organism|
|
12
|
+
%tr
|
13
|
+
%td= organism.title
|
14
|
+
%td= organism.status
|
15
|
+
%td= link_to 'Show', organism
|
16
|
+
%td= link_to 'Edit', edit_organism_path(organism)
|
17
|
+
%td= link_to 'Destroy', organism, :method => :delete, :data => { :confirm => 'Are you sure?' }
|
18
|
+
|
19
|
+
%br
|
20
|
+
|
21
|
+
= link_to 'New Organism', new_organism_path
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
require "adherent"
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Settings in config/environments/* take precedence over those specified here.
|
11
|
+
# Application configuration should go into files in config/initializers
|
12
|
+
# -- all .rb files in that directory are automatically loaded.
|
13
|
+
|
14
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
15
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
16
|
+
|
17
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
18
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
19
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
20
|
+
|
21
|
+
# Activate observers that should always be running.
|
22
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
23
|
+
|
24
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
25
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
26
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
27
|
+
|
28
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
29
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
30
|
+
config.i18n.default_locale = :fr
|
31
|
+
|
32
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
33
|
+
config.encoding = "utf-8"
|
34
|
+
|
35
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
36
|
+
config.filter_parameters += [:password]
|
37
|
+
|
38
|
+
# Enable escaping HTML in JSON.
|
39
|
+
config.active_support.escape_html_entities_in_json = true
|
40
|
+
|
41
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
42
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
43
|
+
# like if you have constraints or database-specific column types
|
44
|
+
# config.active_record.schema_format = :sql
|
45
|
+
|
46
|
+
# Enforce whitelist mode for mass assignment.
|
47
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
48
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
49
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
50
|
+
config.active_record.whitelist_attributes = true
|
51
|
+
|
52
|
+
# Enable the asset pipeline
|
53
|
+
config.assets.enabled = true
|
54
|
+
|
55
|
+
# Version of your assets, change this if you want to expire all your assets
|
56
|
+
config.assets.version = '1.0'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|