Foreword by David Heinemeier Hansson
Chapter 1. Rails Environments and Configuration
1.2 Startup and Application Settings
1.2.3 Additional Configuration
1.3.1 Automatic Class Reloading
2.1 The Two Purposes of Routing
2.2.4 Spotlight on the :id Field
2.2.6 Constraining Request Methods
2.2.9 Routes as Rack Endpoints
2.2.11 Segment Key Constraints
2.4.3 What to Name Your Routes
2.4.5 A Little More Sugar with Your Sugar?
Chapter 3. REST, Resources, and Rails
3.1 REST in a Rather Small Nutshell
3.2 Resources and Representations
3.4.1 REST Resources and Rails
3.4.2 From Named Routes to REST Support
3.5 The Standard RESTful Controller Actions
3.5.1 Singular and Plural RESTful Routes
3.5.2 The Special Pairs: new/create and edit/update
3.5.3 The PUT and DELETE Cheat
3.5.4 Limiting Routes Generated
3.7.1 RESTful Controller Mappings
3.8 RESTful Route Customizations
3.8.4 Mapping to a Different Controller
3.8.5 Routes for New Resources
3.8.6 Considerations for Extra Routes
3.10 Different Representations of Resources
3.11 The RESTful Rails Action Set
Chapter 4. Working with Controllers
4.1.1 Configuring Your Middleware Stack
4.2 Action Dispatch: Where It All Begins
4.2.2 Getting Intimate with the Dispatcher
4.3.3 Rendering Another Action’s Template
4.3.4 Rendering a Different Template Altogether
4.3.5 Rendering a Partial Template
4.3.6 Rendering Inline Template Code
4.3.8 Rendering Other Types of Structured Data
4.6 Controller/View Communication
4.9.1 Via render :text => proc
4.9.2 send_data(data, options = {})
4.9.3 send_file(path, options = {})
Chapter 5. Working with Active Record
5.2.1 Relationship Declarations
5.2.2 Convention over Configuration
5.3.1 Default Attribute Values
5.4 CRUD: Creating, Reading, Updating, Deleting
5.4.1 Creating New Active Record Instances
5.4.2 Reading Active Record Objects
5.4.3 Reading and Writing Attributes
5.4.4 Accessing and Manipulating Attributes Before They Are Typecast
5.4.7 Dynamic Attribute-Based Finders
5.4.13 Updating a Particular Instance
5.4.14 Updating Specific Attributes
5.4.17 Controlling Access to Attributes
5.4.19 Deleting and Destroying
5.6.3 limit(number)
and offset(number)
5.7 Connections to Multiple Databases in Different Models
5.8 Using the Database Connection Directly
5.8.1 The DatabaseStatements Module
5.8.2 Other Connection Methods
5.9 Other Configuration Options
Chapter 6. Active Record Migrations
6.1.3 create_table
(name, options, & block)
6.1.4 change_table
(table_name, & block)
6.1.7 Command-line Column Declarations
6.5 Database-Related Rake Tasks
Chapter 7. Active Record Associations
7.2.1 Adding Associated Objects to a Collection
7.2.2 Association Collection Methods
7.3 The belongs_to
Association
7.3.1 Reloading the Association
7.3.2 Building and Creating Related Objects via the Association
7.5 Many-to-Many Relationships
7.5.3 has_many :through
Options
7.7 Working with Unsaved Objects and Associations
7.9 The AssociationProxy
Class
8.2 The Simple Declarative Validations
8.2.3 validates_confirmation_of
8.2.6 validates_inclusion_of
and validates_exclusion_of
8.2.8 validates_numericality_of
8.2.10 validates_uniqueness_of
8.3.1 :allow_blank
and :allow_nil
8.4.1 Usage and Considerations
8.6 Custom Validation Techniques
8.6.1 Add Custom Validation Macros to Your Application
8.6.2 Create a Custom Validator Class
8.6.3 Add a validate
Method to Your Model
8.8 Working with the Errors Hash
8.9 Testing Validations with Shoulda
Chapter 9. Advanced Active Record
9.2.4 Matched before/after Callbacks
9.2.7 Special Callbacks: after_initialize
and after_find
9.3.1 average(column_name, *options)
9.3.2 count(column_name, *options)
9.3.3 maximum(column_name, *options)
9.3.4 minimum(column_name, *options)
9.3.5 sum(column_name, *options)
9.4.2 Registration of Observers
9.5 Single-Table Inheritance (STI)
9.5.1 Mapping Inheritance to the Database
9.6 Abstract Base Model Classes
9.7 Polymorphic has_many Relationships
9.7.1 In the Case of Models with Comments
9.9.2 Custom Constructors and Converters
9.9.3 Finding Records by a Value Object
9.10 Modules for Reusing Common Behavior
9.10.1 A Review of Class Scope and Contexts
9.11 Modifying Active Record Classes at Runtime
9.11.2 Ruby and Domain-Specific Languages
10.1.1 Template Filename Conventions
10.1.6 Standard Instance Variables
10.1.7 Displaying flash
Messages
10.2.4 Passing Variables to Partials
11.1.1 Reporting Validation Errors
11.1.2 Automatic Form Creation
11.1.3 Customizing the Way Validation Errors Are Highlighted
11.6.1 The Date and Time Selection Helpers
11.6.2 The Individual Date and Time Select Helpers
11.6.3 Common Options for Date Selection Helpers
11.6.4 distance_in_time
Methods with Complex Descriptive Names
11.8.1 Creating Forms for Models
11.8.2 How Form Helpers Get Their Values
11.8.3 Integrating Additional Objects in One Form
11.8.4 Customized Form Builders
11.15 RecordIdentificationHelper
11.20 TranslationHelper
and the I18n API
11.20.2 TranslationHelper
Methods
11.20.4 Setting and Passing the Locale
11.20.5 Setting Locale from Client Supplied Information
11.20.6 Internationalizing Your Application
11.20.7 Organization of Locale Files
11.20.8 Looking Up Translations
11.20.9 How to Store Your Custom Translations
11.20.10 Overview of Other Built-In Methods that Provide I18n Support
11.22 Writing Your Own View Helpers
11.22.1 Small Optimizations: The Title Helper
11.22.2 Encapsulating View Logic: The photo_for
Helper
11.22.3 Smart View: The breadcrumbs
Helper
11.23 Wrapping and Generalizing Partials
12.2 Writing JavaScript in Ruby with RJS
12.2.5 call(function, *arguments, & block)
12.2.7 draggable(id, options = {})
12.2.8 drop_receiving(id, options = {})
12.2.10 insert_html(position, id, *options_for_render)
12.2.14 replace(id, *options_for_render)
12.2.15 replace_html(id, *options_for_render)
12.2.18 sortable(id, options = {})
12.2.20 visual_effect(name, id = nil, options = {})
Chapter 13. Session Management
13.1 What to Store in the Session
13.3.1 Active Record Session Store
13.3.2 Memcache Session Storage
13.3.3 The Controversial CookieStore
13.3.4 Cleaning Up Old Sessions
13.4.1 Reading and Writing Cookies
14.1.3 Setting Up the Controllers
14.1.4 Controller, Limiting Access to Actions
Chapter 15. XML and Active Resource
15.1.1 Customizing to_xml
Output
15.1.2 Associations and to_xml
15.1.4 Dynamic Runtime Attributes
15.3.1 Turning XML into Hashes
15.5 Active Resource Authentication
15.5.1 HTTP Basic Authentication
15.5.2 HTTP Digest Authentication
15.5.3 Certificate Authentication
15.5.4 Proxy Server Authentication
15.5.5 Authentication in the Web Service Controller
16.2.1 Preparing Outbound Email Messages
16.3.1 Handling Incoming Attachments
Chapter 17. Caching and Performance
17.1.1 Caching in Development Mode?
17.1.5 Expiration of Cached Content
17.1.6 Automatic Cache Expiry with Sweepers
17.2.1 Eliminating Extra Database Lookups
17.2.2 Initializing New Caches
17.3.1 expires_in(seconds, options = {})
18.2.2 let(:name) {expression}
18.2.3 let!(:name) {expression}
18.4 Custom Expectation Matchers
18.8.3 Mocked and Stubbed Models
Chapter 19. Extending Rails with Plugins
19.2.3 Extending Rails Classes
19.2.4 The README
and MIT-LICENSE
File
19.2.5 The install.rb
and uninstall.rb
Files
19.2.8 Including Assets with Your Plugin
Chapter 20. Background Processing
A.1.1 active_model/attribute_methods.rb
A.2.1 active_model/callbacks.rb
A.3.1 active_model/conversion.rb
A.7.1 active_model/mass_assignment_security.rb
A.10.1 active_model/observing.rb
A.11.1 active_model/observing.rb
A.12.1 active_model/serialization.rb
A.13.1 active_model/serializers/json.rb
A.14.1 active_model/serializers/xml.rb
A.15.1 active_model/translation.rb
A.16.1 active_model/validations.rb
A.17.1 active_model/validator.rb
B.1.1 active_support/core_ext/array/access
B.1.2 active_support/core_ext/array/conversions
B.1.3 active_support/core_ext/array/extract_options
B.1.4 active_support/core_ext/array/grouping
B.1.5 active_support/core_ext/array/random_access
B.1.6 active_support/core_ext/array/uniq_by
B.1.7 active_support/core_ext/array/wrap
B.1.8 active_support/core_ext/object/blank
B.1.9 active_support/core_ext/object/to_param
B.2 ActiveSupport::BacktraceCleaner
B.2.1 active_support/backtrace_cleaner
B.4 ActiveSupport::BasicObject
B.4.1 active_support/basic_object
B.5 ActiveSupport::Benchmarkable
B.5.1 active_support/benchmarkable
B.6.1 active_support/core_ext/big_decimal/conversions
B.6.2 active_support/json/encoding
B.7 ActiveSupport::BufferedLogger
B.7.1 active_support/buffered_logger
B.8 ActiveSupport::Cache::Store
B.9.1 active_support/callbacks
B.10.1 active_support/core_ext/class/attribute
B.10.2 active_support/core_ext/class/attribute_accessors
B.10.3 active_support/core_ext/class/attribute_accessors
B.10.4 active_support/core_ext/class/delegating_attributes
B.10.5 active_support/core_ext/class/inheritable_attributes
B.10.6 active_support/core_ext/class/subclasses
B.12 ActiveSupport::Configurable
B.12.1 active_support/configurable
B.13.1 active_support/core_ext/date/acts_like
B.13.2 active_support/core_ext/date/calculations
B.13.3 active_support/core_ext/date/ conversions
B.13.4 active_support/core_ext/date/freeze
B.13.5 active_support/json/encoding
B.14.1 active_support/core_ext/date_time/acts_like
B.14.2 active_support/core_ext/date_time/calculations
B.14.3 active_support/core_ext/date_time/conversions
B.14.4 active_support/core_ext/date_time/zones
B.14.5 active_support/json/encoding
B.15 ActiveSupport::Dependencies
B.15.1 active_support/dependencies/autoload
B.16 ActiveSupport::Deprecation
B.17.1 active_support/duration
B.18.1 active_support/core_ext/enumerable
B.18.2 active_support/json/encoding
B.19.1 active_support/core_ext/string/output_safety
B.20.1 active_support/core_ext/object/blank
B.20.2 active_support/json/encoding
B.21.1 active_support/core_ext/file/atomic
B.21.2 active_support/core_ext/file/path
B.22.1 active_support/core_ext/float/rounding
B.23.1 active_support/core_ext/hash/conversions
B.23.2 active_support/core_ext/hash/deep_merge
B.23.3 active_support/core_ext/hash/diff
B.23.4 active_support/core_ext/hash/except
B.23.5 active_support/core_ext/hash/indifferent_access
B.23.6 active_support/core_ext/hash/keys
B.23.7 active_support/core_ext/hash/reverse_merge
B.23.8 active_support/core_ext/hash/slice
B.23.9 active_support/core_ext/object/to_param
B.23.10 active_support/core_ext/object/to_query
B.23.11 active_support/json/encoding
B.23.12 active_support/core_ext/object/blank
B.24 HashWithIndifferentAccess
B.24.1 active_support/hash_with_indifferent_access
B.25 ActiveSupport::Inflector::Inflections
B.25.1 active_support/inflector/inflections
B.25.2 active_support/inflector/transliteration
B.26.1 active_support/core_ext/integer/inflections
B.26.2 active_support/core_ext/integer/multiple
B.27.1 active_support/json/decoding
B.27.2 active_support/json/encoding
B.28.1 active_support/core_ext/kernel/agnostics
B.28.2 active_support/core_ext/kernel/debugger
B.28.3 active_support/core_ext/kernel/reporting
B.28.4 active_support/core_ext/kernel/requires
B.28.5 active_support/core_ext/kernel/singleton_class
B.29.1 active_support/core_ext/logger
B.30 ActiveSupport::MessageEncryptor
B.30.1 active_support/message_encryptor
B.31 ActiveSupport::MessageVerifier
B.31.1 active_support/message_verifier
B.32.1 active_support/core_ext/module/aliasing
B.32.2 active_support/core_ext/module/anonymous
B.32.3 active_support/core_ext/module/attr_accessor_with_default
B.32.4 active_support/core_ext/module/attr_internal
B.32.5 active_support/core_ext/module/attribute_accessors
B.32.6 active_support/core_ext/module/delegation
B.32.7 active_support/core_ext/module/introspection
B.32.8 active_support/core_ext/module/synchronization
B.32.9 active_support/dependencies
B.33 ActiveSupport::Multibyte::Chars
B.33.1 active_support/multibyte/chars
B.33.2 active_support/multibyte/unicode
B.33.3 active_support/multibyte/utils
B.34.1 active_support/core_ext/object/blank
B.34.2 active_support/json/encoding
B.34.3 active_support/whiny_nil
B.35 ActiveSupport::Notifications
B.36.1 active_support/core_ext/object/blank
B.36.2 active_support/json/encoding
B.36.3 active_support/numeric/bytes
B.36.4 active_support/numeric/time
B.37.1 active_support/core_ext/object/acts_like
B.37.2 active_support/core_ext/object/blank
B.37.3 active_support/core_ext/object/duplicable
B.37.4 active_support/core_ext/object/instance_variables
B.37.5 active_support/core_ext/object/to_param
B.37.6 active_support/core_ext/object/with_options
B.37.7 active_support/dependencies
B.37.8 active_support/json/encoding
B.38 ActiveSupport::OrderedHash
B.38.1 active_support/ordered_hash
B.39 ActiveSupport::OrderedOptions
B.39.1 active_support/ordered_options
B.41.1 active_support/core_ext/range/blockless_step
B.41.2 active_support/core_ext/range/conversions
B.41.3 active_support/core_ext/range/include_range
B.41.4 active_support/core_ext/range/include_range
B.42.1 active_support/core_ext/enumerable
B.42.2 active_support/json/encoding
B.43.1 active_support/rescuable
B.44 ActiveSupport::SecureRandom
B.44.1 active_support/secure_random
B.45.1 active_support/json/encoding
B.45.2 active_support/core_ext/object/blank
B.45.3 active_support/core_ext/string/access
B.45.4 active_support/core_ext/string/acts_like
B.45.5 active_support/core_ext/string/conversions
B.45.6 active_support/core_ext/string/encoding
B.45.7 active_support/core_ext/string/exclude
B.45.8 active_support/core_ext/string/filters
B.45.9 active_support/core_ext/string/inflections
B.45.10 active_support/core_ext/string/multibyte
B.45.11 active_support/core_ext/string/output_safety
B.45.12 active_support/core_ext/string/starts_ends_with
B.45.13 active_support/core_ext/string/xchar
B.46 ActiveSupport::StringInquirer
B.47.1 active_support/json/encoding
B.48 ActiveSupport::Testing::Assertions
B.48.1 active_support/testing/assertions
B.49.1 active_support/json/encoding
B.49.2 active_support/core_ext/time/acts_like
B.49.3 active_support/core_ext/time/calculations
B.49.4 active_support/core_ext/time/conversions
B.49.5 active_support/core_ext/time/marshal
B.49.6 active_support/core_ext/time/zones
B.50 ActiveSupport::TimeWithZone
B.51.1 active_support/values/time_zone
B.52.1 active_support/core_ext/object/blank
B.52.2 active_support/json/encoding
3.138.117.75