diff --git a/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.html.erb b/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.html.erb new file mode 100644 index 00000000..6d73f199 --- /dev/null +++ b/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.html.erb @@ -0,0 +1 @@ +text/html multipart \ No newline at end of file diff --git a/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.plain.erb b/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.plain.erb new file mode 100644 index 00000000..f4b91e40 --- /dev/null +++ b/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.plain.erb @@ -0,0 +1 @@ +text/plain multipart \ No newline at end of file diff --git a/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.text.erb b/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.text.erb new file mode 100644 index 00000000..111576b6 --- /dev/null +++ b/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.text.erb @@ -0,0 +1 @@ +text/plain layout - <%= yield %> \ No newline at end of file diff --git a/vendor/rails/actionpack/lib/action_view/locale/en.yml b/vendor/rails/actionpack/lib/action_view/locale/en.yml new file mode 100644 index 00000000..002226fd --- /dev/null +++ b/vendor/rails/actionpack/lib/action_view/locale/en.yml @@ -0,0 +1,91 @@ +"en": + number: + # Used in number_with_delimiter() + # These are also the defaults for 'currency', 'percentage', 'precision', and 'human' + format: + # Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5) + separator: "." + # Delimets thousands (e.g. 1,000,000 is a million) (always in groups of three) + delimiter: "," + # Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00) + precision: 3 + + # Used in number_to_currency() + currency: + format: + # Where is the currency sign? %u is the currency unit, %n the number (default: $5.00) + format: "%u%n" + unit: "$" + # These three are to override number.format and are optional + separator: "." + delimiter: "," + precision: 2 + + # Used in number_to_percentage() + percentage: + format: + # These three are to override number.format and are optional + # separator: + delimiter: "" + # precision: + + # Used in number_to_precision() + precision: + format: + # These three are to override number.format and are optional + # separator: + delimiter: "" + # precision: + + # Used in number_to_human_size() + human: + format: + # These three are to override number.format and are optional + # separator: + delimiter: "" + precision: 1 + + # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words() + datetime: + distance_in_words: + half_a_minute: "half a minute" + less_than_x_seconds: + one: "less than 1 second" + other: "less than {{count}} seconds" + x_seconds: + one: "1 second" + other: "{{count}} seconds" + less_than_x_minutes: + one: "less than a minute" + other: "less than {{count}} minutes" + x_minutes: + one: "1 minute" + other: "{{count}} minutes" + about_x_hours: + one: "about 1 hour" + other: "about {{count}} hours" + x_days: + one: "1 day" + other: "{{count}} days" + about_x_months: + one: "about 1 month" + other: "about {{count}} months" + x_months: + one: "1 month" + other: "{{count}} months" + about_x_years: + one: "about 1 year" + other: "about {{count}} years" + over_x_years: + one: "over 1 year" + other: "over {{count}} years" + + activerecord: + errors: + template: + header: + one: "1 error prohibited this {{model}} from being saved" + other: "{{count}} errors prohibited this {{model}} from being saved" + # The variable :count is also available + body: "There were problems with the following fields:" + diff --git a/vendor/rails/actionpack/test/controller/logging_test.rb b/vendor/rails/actionpack/test/controller/logging_test.rb new file mode 100644 index 00000000..3c936854 --- /dev/null +++ b/vendor/rails/actionpack/test/controller/logging_test.rb @@ -0,0 +1,46 @@ +require 'abstract_unit' + +class LoggingController < ActionController::Base + def show + render :nothing => true + end +end + +class LoggingTest < ActionController::TestCase + tests LoggingController + + class MockLogger + attr_reader :logged + + def method_missing(method, *args) + @logged ||= [] + @logged << args.first + end + end + + setup :set_logger + + def test_logging_without_parameters + get :show + assert_equal 2, logs.size + assert_nil logs.detect {|l| l =~ /Parameters/ } + end + + def test_logging_with_parameters + get :show, :id => 10 + assert_equal 3, logs.size + + params = logs.detect {|l| l =~ /Parameters/ } + assert_equal 'Parameters: {"id"=>"10"}', params + end + + private + + def set_logger + @controller.logger = MockLogger.new + end + + def logs + @logs ||= @controller.logger.logged.compact.map {|l| l.strip} + end +end diff --git a/vendor/rails/actionpack/test/fixtures/layouts/_column.html.erb b/vendor/rails/actionpack/test/fixtures/layouts/_column.html.erb new file mode 100644 index 00000000..96db002b --- /dev/null +++ b/vendor/rails/actionpack/test/fixtures/layouts/_column.html.erb @@ -0,0 +1,2 @@ +
This guide teaches you how to work with the lifecycle of your Active Record objects. More precisely, you will learn how to validate the state of your objects before they go into the database and also how to teach them to perform custom operations at certain points of their lifecycles.
After reading this guide and trying out the presented concepts, we hope that you'll be able to:
+Correctly use all the built-in Active Record validation helpers +
++Create your own custom validation methods +
++Work with the error messages generated by the validation proccess +
++Register callback methods that will execute custom operations during your objects lifecycle, for example before/after they are saved. +
++Create special classes that encapsulate common behaviour for your callbacks +
++Create Observers - classes with callback methods specific for each of your models, keeping the callback code outside your models' declarations. +
+The main reason for validating your objects before they get into the database is to ensure that only valid data is recorded. It's important to be sure that an email address column only contains valid email addresses, or that the customer's name column will never be empty. Constraints like that keep your database organized and helps your application to work properly.
There are several ways to validate the data that goes to the database, like using database native constraints, implementing validations only at the client side or implementing them directly into your models. Each one has pros and cons:
+Using database constraints and/or stored procedures makes the validation mechanisms database-dependent and may turn your application into a hard to test and mantain beast. However, if your database is used by other applications, it may be a good idea to use some constraints also at the database level. +
++Implementing validations only at the client side can be problematic, specially with web-based applications. Usually this kind of validation is done using javascript, which may be turned off in the user's browser, leading to invalid data getting inside your database. However, if combined with server side validation, client side validation may be useful, since the user can have a faster feedback from the application when trying to save invalid data. +
++Using validation directly into your Active Record classes ensures that only valid data gets recorded, while still keeping the validation code in the right place, avoiding breaking the MVC pattern. Since the validation happens on the server side, the user cannot disable it, so it's also safer. It may be a hard and tedious work to implement some of the logic involved in your models' validations, but fear not: Active Record gives you the hability to easily create validations, using several built-in helpers while still allowing you to create your own validation methods. +
+There are two kinds of Active Record objects: those that correspond to a row inside your database and those who do not. When you create a fresh object, using the new method, that object does not belong to the database yet. Once you call save upon that object it'll be recorded to it's table. Active Record uses the new_record? instance method to discover if an object is already in the database or not. Consider the following simple and very creative Active Record class:
class Person < ActiveRecord::Base +end +
We can see how it works by looking at the following script/console output:
>> p = Person.new(:name => "John Doe", :birthdate => Date.parse("09/03/1979")) +=> #<Person id: nil, name: "John Doe", birthdate: "1979-09-03", created_at: nil, updated_at: nil> +>> p.new_record? +=> true +>> p.save +=> true +>> p.new_record? +=> false+
Saving new records means sending an SQL insert operation to the database, while saving existing records (by calling either save, update_attribute or update_attributes) will result in a SQL update operation. Active Record will use this facts to perform validations upon your objects, avoiding then to be recorded to the database if their inner state is invalid in some way. You can specify validations that will be beformed every time a object is saved, just when you're creating a new record or when you're updating an existing one.
For verifying if an object is valid, Active Record uses the valid? method, which basically looks inside the object to see if it has any validation errors. These errors live in a collection that can be accessed through the errors instance method. The proccess is really simple: If the errors method returns an empty collection, the object is valid and can be saved. Each time a validation fails, an error message is added to the errors collection.
Active Record offers many pre-defined validation helpers that you can use directly inside your class definitions. These helpers create validations rules that are commonly used in most of the applications that you'll write, so you don't need to recreate it everytime, avoiding code duplication, keeping everything organized and boosting your productivity. Everytime a validation fails, an error message is added to the object's errors collection, this message being associated with the field being validated.
Each helper accepts an arbitrary number of attributes, received as symbols, so with a single line of code you can add the same kind of validation to several attributes.
All these helpers accept the :on and :message options, which define when the validation should be applied and what message should be added to the errors collection when it fails, respectively. The :on option takes one the values :save (it's the default), :create or :update. There is a default error message for each one of the validation helpers. These messages are used when the :message option isn't used. Let's take a look at each one of the available helpers, listed in alphabetic order.
Validates that a checkbox has been checked for agreement purposes. It's normally used when the user needs to agree with your application's terms of service, confirm reading some clauses or any similar concept. This validation is very specific to web applications and actually this acceptance does not need to be recorded anywhere in your database (if you don't have a field for it, the helper will just create a virtual attribute).
class Person < ActiveRecord::Base + validates_acceptance_of :terms_of_service +end +
The default error message for validates_acceptance_of is "must be accepted"
validates_acceptance_of can receive an :accept option, which determines the value that will be considered acceptance. It defaults to "1", but you can change it.
class Person < ActiveRecord::Base + validates_acceptance_of :terms_of_service, :accept => 'yes' +end +
You should use this helper when your model has associations with other models and they also need to be validated. When you try to save your object, valid? will be called upon each one of the associated objects.
class Library < ActiveRecord::Base + has_many :books + validates_associated :books +end +
This validation will work with all the association types.
+![]() |
+Pay attention not to use validates_associated on both ends of your associations, because this will lead to several recursive calls and blow up the method calls' stack. | +
The default error message for validates_associated is "is invalid". Note that the errors for each failed validation in the associated objects will be set there and not in this model.
You should use this helper when you have two text fields that should receive exactly the same content, like when you want to confirm an email address or password. This validation creates a virtual attribute, using the name of the field that has to be confirmed with _confirmation appended.
class Person < ActiveRecord::Base + validates_confirmation_of :email +end +
In your view template you could use something like
<%= text_field :person, :email %> +<%= text_field :person, :email_confirmation %>+
+![]() |
+This check is performed only if email_confirmation is not nil, and by default only on save. To require confirmation, make sure to add a presence check for the confirmation attribute (we'll take a look at validates_presence_of later on this guide): | +
class Person < ActiveRecord::Base + validates_confirmation_of :email + validates_presence_of :email_confirmation +end +
The default error message for validates_confirmation_of is "doesn't match confirmation"
This helper validates attributes against a block. It doesn't have a predefined validation function. You should create one using a block, and every attribute passed to validates_each will be tested against it. In the following example, we don't want names and surnames to begin with lower case.
class Person < ActiveRecord::Base + validates_each :name, :surname do |model, attr, value| + model.errors.add(attr, 'Must start with upper case') if value =~ /^[a-z]/ + end +end +
The block receives the model, the attribute's name and the attribute's value. If your validation fails, you can add an error message to the model, therefore making it invalid.
This helper validates that the attributes' values are not included in a given set. In fact, this set can be any enumerable object.
class MovieFile < ActiveRecord::Base + validates_exclusion_of :format, :in => %w(mov avi), :message => "Extension %s is not allowed" +end +
The validates_exclusion_of helper has an option :in that receives the set of values that will not be accepted for the validated attributes. The :in option has an alias called :within that you can use for the same purpose, if you'd like to. In the previous example we used the :message option to show how we can personalize it with the current attribute's value, through the %s format mask.
The default error message for validates_exclusion_of is "is not included in the list".
This helper validates the attributes's values by testing if they match a given pattern. This pattern must be specified using a Ruby regular expression, which must be passed through the :with option.
class Product < ActiveRecord::Base + validates_format_of :description, :with => /^[a-zA-Z]+$/, :message => "Only letters allowed" +end +
The default error message for validates_format_of is "is invalid".
This helper validates that the attributes' values are included in a given set. In fact, this set can be any enumerable object.
class Coffee < ActiveRecord::Base + validates_inclusion_of :size, :in => %w(small medium large), :message => "%s is not a valid size" +end +
The validates_inclusion_of helper has an option :in that receives the set of values that will be accepted. The :in option has an alias called :within that you can use for the same purpose, if you'd like to. In the previous example we used the :message option to show how we can personalize it with the current attribute's value, through the %s format mask.
The default error message for validates_inclusion_of is "is not included in the list".
This helper validates the length of your attribute's value. It can receive a variety of different options, so you can specify length contraints in different ways.
class Person < ActiveRecord::Base + validates_length_of :name, :minimum => 2 + validates_length_of :bio, :maximum => 500 + validates_length_of :password, :in => 6..20 + validates_length_of :registration_number, :is => 6 +end +
The possible length constraint options are:
+:minimum - The attribute cannot have less than the specified length. +
++:maximum - The attribute cannot have more than the specified length. +
++:in (or :within) - The attribute length must be included in a given interval. The value for this option must be a Ruby range. +
++:is - The attribute length must be equal to a given value. +
+The default error messages depend on the type of length validation being performed. You can personalize these messages, using the :wrong_length, :too_long and :too_short options and the %d format mask as a placeholder for the number corresponding to the length contraint being used. You can still use the :message option to specify an error message.
class Person < ActiveRecord::Base + validates_length_of :bio, :too_long => "you're writing too much. %d characters is the maximum allowed." +end +
This helper has an alias called validates_size_of, it's the same helper with a different name. You can use it if you'd like to.
This helper validates that your attributes have only numeric values. By default, it will match an optional sign followed by a integral or floating point number. Using the :integer_only option set to true, you can specify that only integral numbers are allowed.
If you use :integer_only set to true, then it will use the /\A[+\-]?\d+\Z/ regular expression to validate the attribute's value. Otherwise, it will try to convert the value using Kernel.Float.
class Player < ActiveRecord::Base + validates_numericallity_of :points + validates_numericallity_of :games_played, :integer_only => true +end +
The default error message for validates_numericallity_of is "is not a number".
This helper validates that the attributes are not empty. It uses the blank? method to check if the value is either nil or an empty string (if the string has only spaces, it will still be considered empty).
class Person < ActiveRecord::Base + validates_presence_of :name, :login, :email +end +
+![]() |
+If you want to be sure that an association is present, you'll need to test if the foreign key used to map the association is present, and not the associated object itself. | +
class LineItem < ActiveRecord::Base + belongs_to :order + validates_presence_of :order_id +end +
+![]() |
+If you want to validate the presence of a boolean field (where the real values are true and false), you will want to use validates_inclusion_of :field_name, :in ⇒ [true, false] This is due to the way Object#blank? handles boolean values. false.blank? # ⇒ true | +
The default error message for validates_presence_of is "can't be empty".
This helper validates that the attribute's value is unique right before the object gets saved. It does not create a uniqueness constraint directly into your database, so it may happen that two different database connections create two records with the same value for a column that you wish were unique. To avoid that, you must create an unique index in your database.
class Account < ActiveRecord::Base + validates_uniqueness_of :email +end +
The validation happens by performing a SQL query into the model's table, searching for a record where the attribute that must be validated is equal to the value in the object being validated.
There is a :scope option that you can use to specify other attributes that must be used to define uniqueness:
class Holiday < ActiveRecord::Base + validates_uniqueness_of :name, :scope => :year, :message => "Should happen once per year" +end +
There is also a :case_sensitive option that you can use to define if the uniqueness contraint will be case sensitive or not. This option defaults to true.
class Person < ActiveRecord::Base + validates_uniqueness_of :name, :case_sensitive => false +end +
The default error message for validates_uniqueness_of is "has already been taken".
There are some common options that all the validation helpers can use. Here they are, except for the :if and :unless options, which we'll cover right at the next topic.
You may use the :allow_nil option everytime you just want to trigger a validation if the value being validated is not nil. You may be asking yourself if it makes any sense to use :allow_nil and validates_presence_of together. Well, it does. Remember, validation will be skipped only for nil attributes, but empty strings are not considered nil.
class Coffee < ActiveRecord::Base + validates_inclusion_of :size, :in => %w(small medium large), + :message => "%s is not a valid size", :allow_nil => true +end +
As stated before, the :message option lets you specify the message that will be added to the errors collection when validation fails. When this option is not used, Active Record will use the respective default error message for each validation helper.
As stated before, the :on option lets you specify when the validation should happen. The default behaviour for all the built-in validation helpers is to be ran on save (both when you're creating a new record and when you're updating it). If you want to change it, you can use :on => :create to run the validation only when a new record is created or :on => :update to run the validation only when a record is updated.
class Person < ActiveRecord::Base + validates_uniqueness_of :email, :on => :create # => it will be possible to update email with a duplicated value + validates_numericallity_of :age, :on => :update # => it will be possible to create the record with a 'non-numerical age' + validates_presence_of :name, :on => :save # => that's the default +end +
Sometimes it will make sense to validate an object just when a given predicate is satisfied. You can do that by using the :if and :unless options, which can take a symbol, a string or a Ruby Proc. You may use the :if option when you want to specify when the validation should happen. If you want to specify when the validation should not happen, then you may use the :unless option.
You can associated the :if and :unless options with a symbol corresponding to the name of a method that will get called right before validation happens. This is the most commonly used option.
class Order < ActiveRecord::Base + validates_presence_of :card_number, :if => :paid_with_card? + + def paid_with_card? + payment_type == "card" + end +end +
You can also use a string that will be evaluated using :eval and needs to contain valid Ruby code. You should use this option only when the string represents a really short condition.
class Person < ActiveRecord::Base + validates_presence_of :surname, :if => "name.nil?" +end +
Finally, it's possible to associate :if and :unless with a Ruby Proc object which will be called. Using a Proc object can give you the hability to write a condition that will be executed only when the validation happens and not when your code is loaded by the Ruby interpreter. This option is best suited when writing short validation methods, usually one-liners.
class Account < ActiveRecord::Base + validates_confirmation_of :password, :unless => Proc.new { |a| a.password.blank? } +end +
When the built-in validation helpers are not enough for your needs, you can write your own validation methods, by implementing one or more of the validate, validate_on_create or validate_on_update methods. As the names of the methods states, the right method to implement depends on when you want the validations to be ran. The meaning of valid is still the same: to make an object invalid you just need to add a message to it's errors collection.
class Invoice < ActiveRecord::Base + def validate_on_create + errors.add(:expiration_date, "can't be in the past") if !expiration_date.blank? and expiration_date < Date.today + end +end +
If your validation rules are too complicated and you want to break it in small methods, you can implement all of them and call one of validate, validate_on_create or validate_on_update methods, passing it the symbols for the methods' names.
class Invoice < ActiveRecord::Base + validate :expiration_date_cannot_be_in_the_past, :discount_cannot_be_more_than_total_value + + def expiration_date_cannot_be_in_the_past + errors.add(:expiration_date, "can't be in the past") if !expiration_date.blank? and expiration_date < Date.today + end + + def discount_cannot_be_greater_than_total_value + errors.add(:discount, "can't be greater than total value") unless discount <= total_value + end +end +
Rails comes with every command line tool you'll need to
+Create a Rails application +
++Generate models, controllers, database migrations, and unit tests +
++Start a development server +
++Mess with objects through an interactive shell +
++Profile and benchmark your new creation +
+… and much, much more! (Buy now!)
This tutorial assumes you have basic Rails knowledge from reading the Getting Started with Rails Guide.
There are a few commands that are absolutely critical to your everyday usage of Rails. In the order of how much you'll probably use them are:
+console +
++server +
++rake +
++generate +
++rails +
+Let's create a simple Rails application to step through each of these commands in context.
The first thing we'll want to do is create a new Rails application by running the rails command after installing Rails.
+![]() |
+You know you need the rails gem installed by typing gem install rails first, right? Okay, okay, just making sure. | +
$ rails commandsapp + + create + create app/controllers + create app/helpers + create app/models + ... + ... + create log/production.log + create log/development.log + create log/test.log +
Rails will set you up with what seems like a huge amount of stuff for such a tiny command! You've got the entire Rails directory structure now with all the code you need to run our simple application right out of the box.
+![]() |
+This output will seem very familiar when we get to the generate command. Creepy foreshadowing! | +
Let's try it! The server command launches a small web server written in Ruby named WEBrick which was also installed when you installed Rails. You'll use this any time you want to view your work through a web browser.
+![]() |
+WEBrick isn't your only option for serving Rails. We'll get to that in a later section. [XXX: which section] | +
Here we'll flex our server command, which without any prodding of any kind will run our new shiny Rails app:
$ cd commandsapp +$ ./script/server +=> Booting WEBrick... +=> Rails 2.2.0 application started on http://0.0.0.0:3000 +=> Ctrl-C to shutdown server; call with --help for options +[2008-11-04 10:11:38] INFO WEBrick 1.3.1 +[2008-11-04 10:11:38] INFO ruby 1.8.5 (2006-12-04) [i486-linux] +[2008-11-04 10:11:38] INFO WEBrick::HTTPServer#start: pid=18994 port=3000 +
WHOA. With just three commands we whipped up a Rails server listening on port 3000. Go! Go right now to your browser and go to http://localhost:3000. I'll wait.
See? Cool! It doesn't do much yet, but we'll change that.
The generate command uses templates to create a whole lot of things. You can always find out what's available by running generate by itself. Let's do that:
$ ./script/generate +Usage: ./script/generate generator [options] [args] + +... +... + +Installed Generators + Builtin: controller, integration_test, mailer, migration, model, observer, performance_test, plugin, resource, scaffold, session_migration + +... +... +
+![]() |
+You can install more generators through generator gems, portions of plugins you'll undoubtedly install, and you can even create your own! | +
Using generators will save you a large amount of time by writing boilerplate code for you — necessary for the darn thing to work, but not necessary for you to spend time writing. That's what we have computers for, right?
Let's make our own controller with the controller generator. But what command should we use? Let's ask the generator:
+![]() |
+All Rails console utilities have help text. For commands that require a lot of input to run correctly, you can just try the command without any parameters (like rails or ./script/generate). For others, you can try adding —help or -h to the end, as in ./script/server —help. | +
$ ./script/generate controller +Usage: ./script/generate controller ControllerName [options] + +... +... + +Example: + `./script/generate controller CreditCard open debit credit close` + + Credit card controller with URLs like /credit_card/debit. + Controller: app/controllers/credit_card_controller.rb + Views: app/views/credit_card/debit.html.erb [...] + Helper: app/helpers/credit_card_helper.rb + Test: test/functional/credit_card_controller_test.rb + +Modules Example: + `./script/generate controller 'admin/credit_card' suspend late_fee` + + Credit card admin controller with URLs /admin/credit_card/suspend. + Controller: app/controllers/admin/credit_card_controller.rb + Views: app/views/admin/credit_card/debit.html.erb [...] + Helper: app/helpers/admin/credit_card_helper.rb + Test: test/functional/admin/credit_card_controller_test.rb +
Ah, the controller generator is expecting parameters in the form of generate controller ControllerName action1 action2. Let's make a Greetings controller with an action of hello, which will say something nice to us.
$ ./script/generate controller Greeting hello + exists app/controllers/ + exists app/helpers/ + create app/views/greeting + exists test/functional/ + create app/controllers/greetings_controller.rb + create test/functional/greetings_controller_test.rb + create app/helpers/greetings_helper.rb + create app/views/greetings/hello.html.erb +
Look there! Now what all did this generate? It looks like it made sure a bunch of directories were in our application, and created a controller file, a functional test file, a helper for the view, and a view file. All from one command!
This guide covers the configuration and initialization features available to Rails applications. By referring to this guide, you will be able to:
+Adjust the behavior of your Rails applications +
++Add additional code to be run at application start time +
+preinitializers +environment.rb first +env-specific files +initializers (load_application_initializers) +after-initializer
organization, controlling load order+
+November 5, 2008: Rough outline by Mike Gunderloy +
+actionmailer/lib/action_mailer/base.rb +257: cattr_accessor :logger +267: cattr_accessor :smtp_settings +273: cattr_accessor :sendmail_settings +276: cattr_accessor :raise_delivery_errors +282: cattr_accessor :perform_deliveries +285: cattr_accessor :deliveries +288: cattr_accessor :default_charset +291: cattr_accessor :default_content_type +294: cattr_accessor :default_mime_version +297: cattr_accessor :default_implicit_parts_order +299: cattr_reader :protected_instance_variables
actionmailer/Rakefile +36: rdoc.options << —line-numbers << —inline-source << -A cattr_accessor=object
actionpack/lib/action_controller/base.rb +263: cattr_reader :protected_instance_variables +273: cattr_accessor :asset_host +279: cattr_accessor :consider_all_requests_local +285: cattr_accessor :allow_concurrency +317: cattr_accessor :param_parsers +321: cattr_accessor :default_charset +325: cattr_accessor :logger +329: cattr_accessor :resource_action_separator +333: cattr_accessor :resources_path_names +337: cattr_accessor :request_forgery_protection_token +341: cattr_accessor :optimise_named_routes +351: cattr_accessor :use_accept_header +361: cattr_accessor :relative_url_root
actionpack/lib/action_controller/caching/pages.rb +55: cattr_accessor :page_cache_directory +58: cattr_accessor :page_cache_extension
actionpack/lib/action_controller/caching.rb +37: cattr_reader :cache_store +48: cattr_accessor :perform_caching
actionpack/lib/action_controller/dispatcher.rb +98: cattr_accessor :error_file_path
actionpack/lib/action_controller/mime_type.rb +24: cattr_reader :html_types, :unverifiable_types
actionpack/lib/action_controller/rescue.rb +36: base.cattr_accessor :rescue_responses +40: base.cattr_accessor :rescue_templates
actionpack/lib/action_controller/session/active_record_store.rb +60: cattr_accessor :data_column_name +170: cattr_accessor :connection +173: cattr_accessor :table_name +177: cattr_accessor :session_id_column +181: cattr_accessor :data_column +282: cattr_accessor :session_class
actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +44: cattr_accessor :included_tags, :instance_writer ⇒ false
actionpack/lib/action_view/base.rb +189: cattr_accessor :debug_rjs +193: cattr_accessor :warn_cache_misses
actionpack/lib/action_view/helpers/active_record_helper.rb +7: cattr_accessor :field_error_proc
actionpack/lib/action_view/helpers/form_helper.rb +805: cattr_accessor :default_form_builder
actionpack/lib/action_view/template_handlers/erb.rb +47: cattr_accessor :erb_trim_mode
actionpack/test/active_record_unit.rb +5: cattr_accessor :able_to_connect +6: cattr_accessor :connected
actionpack/test/controller/filters_test.rb +286: cattr_accessor :execution_log
actionpack/test/template/form_options_helper_test.rb +3:TZInfo::Timezone.cattr_reader :loaded_zones
activemodel/lib/active_model/errors.rb +28: cattr_accessor :default_error_messages
activemodel/Rakefile +19: rdoc.options << —line-numbers << —inline-source << -A cattr_accessor=object
activerecord/lib/active_record/attribute_methods.rb +9: base.cattr_accessor :attribute_types_cached_by_default, :instance_writer ⇒ false +11: base.cattr_accessor :time_zone_aware_attributes, :instance_writer ⇒ false
activerecord/lib/active_record/base.rb +394: cattr_accessor :logger, :instance_writer ⇒ false +443: cattr_accessor :configurations, :instance_writer ⇒ false +450: cattr_accessor :primary_key_prefix_type, :instance_writer ⇒ false +456: cattr_accessor :table_name_prefix, :instance_writer ⇒ false +461: cattr_accessor :table_name_suffix, :instance_writer ⇒ false +467: cattr_accessor :pluralize_table_names, :instance_writer ⇒ false +473: cattr_accessor :colorize_logging, :instance_writer ⇒ false +478: cattr_accessor :default_timezone, :instance_writer ⇒ false +487: cattr_accessor :schema_format , :instance_writer ⇒ false +491: cattr_accessor :timestamped_migrations , :instance_writer ⇒ false
activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +11: cattr_accessor :connection_handler, :instance_writer ⇒ false
activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +166: cattr_accessor :emulate_booleans
activerecord/lib/active_record/fixtures.rb +498: cattr_accessor :all_loaded_fixtures
activerecord/lib/active_record/locking/optimistic.rb +38: base.cattr_accessor :lock_optimistically, :instance_writer ⇒ false
activerecord/lib/active_record/migration.rb +259: cattr_accessor :verbose
activerecord/lib/active_record/schema_dumper.rb +13: cattr_accessor :ignore_tables
activerecord/lib/active_record/serializers/json_serializer.rb +4: base.cattr_accessor :include_root_in_json, :instance_writer ⇒ false
activerecord/Rakefile +142: rdoc.options << —line-numbers << —inline-source << -A cattr_accessor=object
activerecord/test/cases/lifecycle_test.rb +61: cattr_reader :last_inherited
activerecord/test/cases/mixin_test.rb +9: cattr_accessor :forced_now_time
activeresource/lib/active_resource/base.rb +206: cattr_accessor :logger
activeresource/Rakefile +43: rdoc.options << —line-numbers << —inline-source << -A cattr_accessor=object
activesupport/lib/active_support/buffered_logger.rb +17: cattr_accessor :silencer
activesupport/lib/active_support/cache.rb +81: cattr_accessor :logger
activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +5:# cattr_accessor :hair_colors +10: def cattr_reader(*syms) +29: def cattr_writer(*syms) +50: def cattr_accessor(*syms) +51: cattr_reader(*syms) +52: cattr_writer(*syms)
activesupport/lib/active_support/core_ext/logger.rb +34: cattr_accessor :silencer
activesupport/test/core_ext/class/attribute_accessor_test.rb +6: cattr_accessor :foo +7: cattr_accessor :bar, :instance_writer ⇒ false
activesupport/test/core_ext/module/synchronization_test.rb +6: @target.cattr_accessor :mutex, :instance_writer ⇒ false
railties/doc/guides/html/creating_plugins.html +786: cattr_accessor <span style="color: #990000">:</span>yaffle_text_field<span style="color: #990000">,</span> <span style="color: #990000">:</span>yaffle_date_field +860: cattr_accessor <span style="color: #990000">:</span>yaffle_text_field<span style="color: #990000">,</span> <span style="color: #990000">:</span>yaffle_date_field
railties/lib/rails_generator/base.rb +93: cattr_accessor :logger
railties/Rakefile +265: rdoc.options << —line-numbers << —inline-source << —accessor << cattr_accessor=object
railties/test/rails_info_controller_test.rb +12: cattr_accessor :local_request
Rakefile +32: rdoc.options << -A cattr_accessor=object