1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

27 commits

Author SHA1 Message Date
Rafael Mendonça França
04ad814bb9 Make sure multiline string is not accepted by the regexp 2013-12-19 17:28:19 -02:00
Hincu Petru
4cb30d9f8b Fixed configurable.rb regular expression name check 2013-12-19 17:30:01 +00:00
claudiob
019df98875 Replace comments' non-breaking spaces with spaces
Sometimes, on Mac OS X, programmers accidentally press Option+Space
rather than just Space and don’t see the difference. The problem is
that Option+Space writes a non-breaking space (0XA0) rather than a
normal space (0x20).

This commit removes all the non-breaking spaces inadvertently
introduced in the comments of the code.
2012-12-04 22:11:54 -08:00
Vijay Dev
3b7947ea31 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	actionmailer/lib/action_mailer/base.rb
	activesupport/lib/active_support/configurable.rb
	activesupport/lib/active_support/core_ext/module/deprecation.rb
	guides/source/action_controller_overview.md
	guides/source/active_support_core_extensions.md
	guides/source/ajax_on_rails.textile
	guides/source/association_basics.textile
	guides/source/upgrading_ruby_on_rails.md

While resolving conflicts, I have chosen to ignore changes done in
docrails at some places - these will be most likely 1.9 hash syntax
changes.
2012-09-21 22:49:20 +05:30
Francesco Rodriguez
d71d5ba71f update AS docs [ci skip] 2012-09-17 00:22:18 -05:00
Larry Lv
1efe30ebce set up config_accessor with a default value by block
* ActiveSupport::Configurable should allow config_accessor to take
  default value by block, just like cattr_accessor.

    class User
      include ActiveSupport::Configurable
      config_accessor :hair_colors do
        [:brown, :black, :blonde, :red]
      end
    end

    User.hair_colors # => [:brown, :black, :blonde, :red]

* remove trailing whitespaces in configurable.rb and its test file.

* Update ActiveSupport CHANGELOG.
2012-09-17 09:14:21 +08:00
benolee
008023c29a correct line numbers for reader and writer methods 2012-06-24 14:39:49 -05:00
Francesco Rodriguez
5e1d40f773 add instance_accessor option to ActiveSupport::Configurable#config_accessor
Changes:

* Add `instance_accessor` option to opt out of the instance writer and
  instance reader methods.
* Raises a NameError if the name of the attribute is not valid.
* Update documentation and tests.
* Add CHANGELOG entry in activesupport.
2012-06-05 10:50:48 -05:00
Sergey Nartimov
cead2dd1f4 remove unused requires 2012-01-18 05:01:09 +03:00
José Valim
d677097eb6 Fix configurable cristalization and tests. 2011-06-29 13:57:59 -03:00
José Valim
894bdbd53d Move variables to underscore format, update protected instance variables list. 2011-05-06 14:57:25 +02:00
Xavier Noria
6ce844a3c1 removes Examples headers introduced in 9b96de6
Example headers are discouraged in the API guidelines.
Code just flows with the text. They may be good in
places where there's a lot of stuff and structure may
add clarity
2011-03-06 17:49:39 +01:00
suchasurge
9b96de6f3d Some style changes 2011-03-06 10:26:24 +01:00
Oriol Gual and Josep M. Bach
f42562f97b Make ActiveSupport::Configurable work with modules
[#6486 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-28 13:30:32 -02:00
Neeraj Singh
aa1ac1ca8c Add comment for config_accessor method 2010-11-30 09:44:12 -05:00
José Valim
6067d16200 Call it compile_methods! and do the same on AM. 2010-09-27 20:43:56 +02:00
thedarkone
5a518487fe Try to use Hash's native #[] for speed. 2010-09-27 17:45:58 +02:00
thedarkone
8cda132136 Make InheritableOptions's constructor more flexible. 2010-09-27 17:45:58 +02:00
thedarkone
918dc27345 Compile ActionController::Base.config's methods to avoid method_missing overhead. 2010-09-27 17:45:58 +02:00
Xavier Noria
3ba61ecb7f Revert "Add example label to activesupport/configurable"
This reverts commit f480b2cea6.

Reason: API guidelines discourage this, see http://edgeguides.rubyonrails.org/api_documentation_guidelines.html#example-code
2010-08-15 02:22:38 +02:00
Xavier Noria
dd18840b79 Revert "Add example label to active_support/configurable"
This reverts commit 693f770afe.

Reason: to be able to revert f480b2cea6
2010-08-15 02:22:38 +02:00
Josep M. Bach
e8ef58a697 Add example label to active_support/configurable 2010-08-15 02:22:38 +02:00
Josep M. Bach
664afe37dd Add example label to activesupport/configurable 2010-08-15 02:22:38 +02:00
Josep M. Bach
c7adc96186 Documented active_support/configurable 2010-08-15 02:22:37 +02:00
José Valim
25f1e015c0 Ensure @config is not a reserved instance variable in controllers. [#5342 state:resolved] 2010-08-11 10:26:07 -03:00
José Valim
4163ccec23 Clean up the config object in ActionPack. Create config_accessor which just delegates to the config object, reducing the number of deprecations and add specific tests. 2010-04-22 12:00:13 +02:00
Yehuda Katz
a41c6c35ca Start adding configuration to ActionView instead of using constants.
By using config rather than hardcoded constants, we can evolve the
  configuration system over time (we'd just need to update the config
  method with more robust capabilities and all consumers would get
  the capabilities with no code changes)
2009-10-14 13:36:41 -07:00