
Index Index routes.rb, 71 A tests, 71–72 using, 76–78 AATOS (Acts as Taggable On Steroids), installing, 132 views and, 74–76 ActAsReviewableGenerator class, 398 autocomplete, JavaScript and, 228–229 action caching, 362 auto_complete_for method, 229 ActiveCalendar, 270 automation, 103 ActiveRecord, 158 callback feature, 173–174 class names, 158 MySQL and, 356–357 B :polymorphic option, 175–176 BDD (Behavior-Driven Design), 193 table names, 158 before_filter method, 19 test setup, 407–410 before_save method, 174 translations and, 279–281 Behaviors gem, 205–206 ActiveResource, 241–242 benchmarks, Railsbench, 340–344 client script, 243–244 bindings, 368–370 copy operations, 245 Proc object, 368 deletions, 245 block helpers, 77 find, 244 Bloglines, 241 rails:edge:freeze, 242 bots, 80 updates, 245 CAPTCHA, 86–94 ActiveWebService, 241 protection acts_as_ferret method, 147 authorization email, 84–86 acts_as_reviewable plugin, 383–385 controller logic, 83 acts_as_taggable method, 133 token model, 80–81 after_save method, 173 bottlenecks, 338 ago method, 272 branches directory, 42 Ajax, in-place editing, 34 builder templates, XML, 248–249 alert method, 233 Builder::XmlMarkup, 248 alias keyword, 381 alias method, 381 Apache, Mongrel load balancing and, 333–334 APIs (application program interface), tags, 133–134 C applications, starting points, 2 caching, 360–361 Aptana plug-in, 444 action caching, 362 ARTS plugin, 235–236 expiration, 364 asserting HTML, 23–25 fragment caching, 362–363 creation, 31–34 COPYRIGHTEDpage MATERIAL caching, 361–362 assert_parse method, 26 storage, 364 assert_select, 23–25 tags, 134–135 assign method, 233 CakePHP, 445 associations, data hijacking prevention, 178–179 calendars, 270–271 Atom Feed Helper, 250–253 call method, 233 attachment_fu plugin, 288–296 Camping, 445–446 data setup, 289 can_edit_ingredient method, 220 forms, 293–294 Capistrano has_attachment method, 290 dependencies, creating, 324 images, displaying, 294–296 deployment testing, 291–293 basic, 316–318 authentication clustered deployment, 329–333 controller, 72–74 multistage, 325 bbindex.inddindex.indd 444949 11/30/08/30/08 44:37:42:37:42 PPMM Capistrano (continued) Capistrano (continued) hierarchical databases, 170 installing, 314 indexing, 360 introduction, 313–314 legacy, 156–157 SSH and, 314 relational databases, 170 tasks, 318–320 normalization, 170 writing, 322–323 sessions variables, 320–321 ActiveRecord store, 354–355 CAPTCHA (Completely Automated Public turing test to tell SQLSessionStore, 355–356 Computers and Humans Apart), 86–94 setup, 17 charts tz, 264 RMagick, Gruff, 306–309 date and time, 262 Sparklines, 309–311 ago method, 272 classes date arithmetic, 271–273 ActAsReviewableGenerator, 398 distance_of_time_in_words method, 271 DateTime, 262 DST (daylight savings time), 263 FileList, 112 duration helpers, 271–272 FormBuilder, 64 from_now method, 272 metaprogramming, 373–375 GMT (Greenwich Mean Time), 263 Time, 262 inputting dates, 266 TimeZone, 264 text input, 268–269 TzinfoTimezone, 264 time zones, 266–268 TzTime, 265 JavaScript calendars, 270–271 class_eval method, 370 outputting dates, 271–273 commands string formats, 272–273 generators, 399–400 time zones, 263–266 rake, 17 time_ago_in_words, 271 revert, 44 timestamps, 263–266 svn commit, 46–47 TimeZone class, 264 svn mkdir, 42 TzinfoTimezone class, 264 svnadmin create, 42 TzTime class, 265 svnserve, 50–52 UTC (Coordinated Universal Time), 263 consuming web services, 257–259 DateTime class, 262 controller object db:abort_if_pending_migrations, 105 before_filter method, 19 db:charset, 106 testing, 19–20 db:collation, 106 controllers db:create, 105 authentication, 72–74 db:create:all, 105 create method, 13–14 db:drop, 105 delete method, 14–15 db:fixtures:identify, 105 edit method, 13 db:fixtures:load, 105 index method, 11–12 db:migrate, 105 new method, 13 db:migrate:redo, 105 show method, 12 db:migrate:reset, 105 update method, 14 db:reset, 105 cookies db:rollback, 105 life cycle, 97–98 db:schema:dump, 105 login, validation, 98–100 db:schema:load, 105 persistent login cookies, 94 db:sessions:clear, 106 persistent login mechanism, 95–97 db:sessions:create, 106 create method, 13–14 db:structure:dump, 105 created_at, 263 db:test:clone, 106 cross-site scripting security, 237–238 db:test:clone_structure, 106 CRUD (Create, Read, Update, Delete), 4 db:test:prepare, 106 CruiseControl.rb, 120–123 db:test:purge, 106 db:version, 106 delete method, 14–15, 238 D deployment, 313 Capistrano and, 313–316 data hijacking, preventing, associations and, 178–179 basic deployment, 316–318 databases hot deployment, 317 downloading, 443 Mongrel, 326–328 flat databases, 170 basic deployment, 328–329 450 bbindex.inddindex.indd 445050 11/30/08/30/08 44:37:43:37:43 PPMM helpers, testing Index clustered deployment, 329–333 FixtureScenarioBuilder plugin, 206–207 multistage, 325 flat databases, 170 desc method, 112 FlexMock, 187–189 distance_of_time_in_words method, 271 expectations, 191–192 Django, 446 stubs, 189–191 doc:app, 107 foreign keys, 164 doc:clobber_app, 107 FormBuilder, refactoring forms, 64–67 doc:clobber_plugins, 107 FormBuilder class, 64 doc:clobber_rails, 107 form_for method, 15 doc:plugins, 107 forms doc:rails, 107 attachment_fu plugin, 293–294 doc:reapp, 107 refactoring, FormBuilder, 64–67 doc:rerails, 107 user creation form, 60–64 DOM, elements, selecting, 233 fragment caching, 362–363 downloads frameworks databases, 443 CakePHP, 445 installers, 444 Camping, 445–446 Mongrel, 443 Django, 446 platform notes Grails, 446 Linux, 441 Merb, 446–447 Mac OS X, 441–442 TurboGears, 447 Windows, 442 FreeImage, 286 Rails, 442–443 from_now method, 272 Ruby, 442 Subversion, 443 text editors, 444 G DRY (Don’t Repeat Yourself), 77 DSL (domain-specific language), 112 generators DST (daylight savings time), 263 ActAsReviewableGenerator class, 398 duck punching, 378–385 basic functionality, 396–398 commands, 399–400 manifest method, 398–400 E testing, 400–402 GeneratorTestHelper, 404–406 E text editor, 444 migration templates, 406 Eclipse, 444 writing test, 402–404 Edge Rails, 53–55 GlassFish, 439 rake, 55–56 Globalize plugin, 274–275 edit method, 13 localize method, 275–276 editing, in-place, 34 translations, 276–278 Emacs, 444 displaying, 278–279 encrypted passwords, storing, 67–70 GMT (Greenwich Mean Time), 263 ERB, replacements Google Reader, 241 Haml, 422–427 Grails, 446 Liquid, 427–431 graphics Markaby, 418–421 files, uploading, 288–296 .erb files, 215 library eval method, 368–370 ImageScience, 296–297 :except option, 247 MiniMagick, 303–306 executable files, marking, 46 RMagick, 297–303 graphics packages, RMagick, 286 GraphicsMagick, 285, 286 F Gregorian calendar, 262 Gruff, 306–309 Ferret fields, 148–149 installation, 146–147 search results, 150–151 H FileList class, 112 Haml, 422–427 fixture_file_upload method, 292 has_attachment method, 290 fixtures method, 160–163 helper methods, block helpers, 77 FixtureScenario plugin, 206–207 helpers, testing, 207–209 451 bbindex.inddindex.indd 445151 11/30/08/30/08 44:37:43:37:43 PPMM hide method hide method, 233 Liquid, 427–431 hierarchical databases, 170 localization, 273 hot deployment, 317 localize method, 275–276 HTML (Hypertext Markup Language), asserting, 23–25 localtime method, 263 Locomotive, 444 log:clear, 109 login I cookies, validation, 98–100 ImageMagick, 285, 286 persistent login cookies, 94 installation persistent login mechanism, 95–97 Mac OS X, 287 logs, performance and, 345–346 Windows, 286 images displaying, attachment_fu, 294–296 M uploading, 288–296 ImageScience, 285 manifest method, 398–400 FreeImage, 286 Markaby graphics library, 296–297 standalone, 420–421 with_image method, 296 template files, 418–420 in-place editing, 34 menus JavaScript and, 226–228 object cache, 130–131 index method, 11–12, 250 single-level, 125–130 indexing database, 360 YAML files, 128 IngredientParser class, 27 Merb, 446–447 ingredient.user method, 221 merge feature of YAML, 156–157 installers, 444 metaprogramming Instant Rails, 444 classes, 373–375 internationalization, 273 duck punching, 378–385 tracking routes, 281–282 introduction, 367 introspection introspection and, 370 metaprogramming and, 370 methods, defining dynamically, 387–389 methods, 371–373 monkey patching, 378–385 objects, 373–375 singletons, 375–378 method timings, ruby-prof, 346–352 J method_eval method, 370 JavaScript method_missing method, 248 autocomplete, 228–229 methods calendars, 270–271 acts_as_ferret, 147 DRY violations, fixing, 213–217 acts_as_taggable, 133 in-place editing, 226–228 after_save, 173 tooltips, 222–226 ago, 272 writing, RJS example, 230–232 alert, 233 JDN (Julian day number), 262 alias, 381 jEdit, 444 assert_parse, 26 JRails, running, 435–437 assign, 233 JRuby on JRails, 431 auto_complete_for, 229 JSON (JavaScript Object Notation), 241 before_filter, 19 producing, 256–257 before_save, 174 Julian day number, 262 call, 233 can_edit_ingredient, 220 class_eval, 370 create, 13–14 L defining dynamically, 387–389 legacy databases, 156–157 delete, 14–15, 238 testing, fixtures method, 160–163 desc, 112 lightboxing, RJS, 234–235 distance_of_time_in_words, 271 link_to method, 15 edit, 13 link_to_remote method, 217, 219 eval, 368–370 link_to_unless_current method, 125 fixture_file_upload, 292 452 bbindex.inddindex.indd 445252 11/30/08/30/08 44:37:44:37:44 PPMM plugins Index fixtures, 160–163 multistage deployment, 325 form_for, 15 MySQL, 17 from_now, 272 has_attachment, 290 index, 11–12, 250 N ingredient.user, 221 introspective, 371–373 nested routes, 9–10 link_to, 15 NetBeans,
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages9 Page
-
File Size-