José Valim
410a42860b
Get rid of the alternate namespace lookup.
2011-06-11 18:01:26 +02:00
thoefer
0831b7e076
Brought back alternative convention for namespaced models in i18n.
2011-06-08 13:40:17 +02:00
Xavier Noria
5e21247131
Merge branch 'master' of git://github.com/lifo/docrails
...
Conflicts:
activerecord/RUNNING_UNIT_TESTS
2011-06-06 22:23:30 +02:00
Vijay Dev
82aedbb96d
fix incorrect output
2011-06-04 20:12:25 +05:30
Vijay Dev
ced2b25036
use clearer variable name in examples
2011-06-04 02:11:43 +05:30
Vijay Dev
caa8ab09f7
remove stray (
2011-06-03 14:25:13 +05:30
Ben Orenstein
8e071bc068
Change hashrocket spacing to match conventions.
2011-06-02 17:33:48 -04:00
Guillermo Iguaran
698b600719
Don't add .rb in requires
2011-05-31 21:43:04 -05:00
Damien Mathieu
70381cf507
no need for .rb
2011-05-31 23:38:51 +02:00
Damien Mathieu
bb828990bd
string inflections are needed for running tests in isolation
2011-05-31 23:38:39 +02:00
José Valim
12786518f1
Update CHANGELOG.
2011-05-31 12:26:32 +02:00
José Valim
139a9f7011
Transform the symbol into a constant lookup.
2011-05-31 12:24:30 +02:00
Bogdan Gusiev
aa2639e746
ActiveModel::MassAssignmentSecurity.mass_assignment_sanitizer method
...
In order to specify your own sanitize method
Implemented .mass_assignment_sanitizer configuration option
2011-05-30 11:34:00 +03:00
José Valim
0731945e74
Merge pull request #1334 from bogdan/callback
...
MassAssignmentSecurity: add ability to specify your own sanitizer
2011-05-26 11:47:35 -07:00
Bogdan Gusiev
c7567c9a6d
MassAssignmentSecurity: add ability to specify your own sanitizer
...
Added an ability to specify your own behavior on mass assingment
protection, controlled by option:
ActiveModel::MassAssignmentSecurity.mass_assignment_sanitizer
2011-05-26 15:58:43 +03:00
Xavier Noria
00e1d0832e
Merge branch 'master' of git://github.com/lifo/docrails
...
Conflicts:
actionmailer/lib/action_mailer/base.rb
activesupport/lib/active_support/core_ext/kernel/requires.rb
2011-05-25 22:48:47 +02:00
Vijay Dev
79e9a2983a
fixes Rake::GemPackageTask deprecation warnings from rake 0.9.0
2011-05-24 23:39:24 +05:30
Sebastian Martinez
2a4b780ab1
Remove extra white spaces on ActiveModel docs.
2011-05-23 20:39:10 -03:00
Joshua Peek
5e519fb015
Merge branch '3-1-stable'
...
Conflicts:
actionpack/actionpack.gemspec
activemodel/activemodel.gemspec
2011-05-22 20:11:36 -05:00
José Valim
06474c1553
Merge pull request #1192 from arunagw/removal_extra
...
No more need rubygems here.
2011-05-22 09:12:27 -07:00
José Valim
9164dda151
Fix I18n dependency as final is out.
2011-05-22 13:39:13 +02:00
José Valim
d5646e842f
Move I18n dependency back to ActiveSupport.
2011-05-22 13:31:19 +02:00
Daniel Schierbeck
93659a3166
Remove superfluous whitespace from ActiveModel::SecurePassword
...
Only one space is needed, yo!
2011-05-22 04:02:47 -07:00
David Heinemeier Hansson
82857adc56
Bump versions for rc1
2011-05-21 20:56:52 -05:00
Arun Agrawal
1ffc3063b7
No more need rubygems here.
2011-05-22 02:02:56 +05:30
Xavier Noria
eb0257944e
Merge pull request #1180 from Karunakar/documentation_change
...
Documentation Error Fixed for ticket #839
2011-05-21 10:39:28 -07:00
José Valim
26703f4905
Merge pull request #1165 from arunagw/rubyforge_remove
...
Not updating rubyforge for new versions.
2011-05-21 04:55:37 -07:00
Ganesh Kumar
3d789ea4b9
ActionMailer deliver method Documentation corrected Ticket #761
2011-05-21 13:55:52 +05:30
Yves Senn
e5429b789d
Specify the name to be used for ActiveModel::Name fixes #1168
...
This patch allows to specify the name of your models independent of the class name.
2011-05-20 16:59:09 +02:00
Arun Agrawal
f72f591c8c
Not updating rubyforge for new versions. Result of "gem list -d rails" is not useful.
2011-05-20 17:43:40 +05:30
Guillermo Iguaran
ec1993c33f
Prefer each instead of for in
2011-05-19 01:25:31 -05:00
Jim Herzberg
fbf99653f1
Attributes with :string type should not be given the type passed in model serialization options. Closes #1058
2011-05-18 15:52:55 -04:00
Akira Matsuda
35c5ccb30c
Remove unneeded merge with default false options
2011-05-16 15:37:44 +09:00
Akira Matsuda
cbe1d2488b
Don't add DEFAULT_TOKENIZER to every instance of LengthValidator. Just use it only when needed.
2011-05-16 15:37:44 +09:00
Xavier Noria
d491130236
Merge branch 'master' of git://github.com/lifo/docrails
...
Conflicts:
actionpack/lib/action_view/helpers/date_helper.rb
railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
2011-05-14 11:21:27 +02:00
Sebastian Martinez
21b61a8ac4
Follow code conventions on some tests
2011-05-10 20:58:36 -03:00
Aaron Patterson
134a05adcb
Merge pull request #493 from guilleiguaran/changelog-fixes
...
Merging 3.0.x CHANGELOGs
2011-05-10 10:04:54 -07:00
Guillermo Iguaran
259c749de1
Merging 3.0.x CHANGELOGs
2011-05-10 11:51:35 -05:00
Joshua Wehner
2cef2d411a
Methods that return nil should not be considered YAML
2011-05-10 12:06:09 -04:00
Josh Kalderimis
b2451f4a7f
renamed mass-assignment scopes to roles, updated code, tests, docs and security guide
2011-05-08 16:43:29 +02:00
Myron Marston
99363dcf60
Add documentation for new observer enable/disable feature.
2011-05-06 10:00:14 -07:00
José Valim
41a6d96c1b
Update CHANGELOGs.
2011-05-06 05:53:58 +02:00
Sebastian Martinez
6826936335
Improve doc styles for ActiveModel::Conversion
2011-05-04 22:49:11 -03:00
David Heinemeier Hansson
169ae75e09
Prepare for beta1
2011-05-04 20:21:05 -05:00
Sebastian Martinez
b84b759ec6
Improved ActiveModel Observing docs.
2011-04-30 20:35:25 -03:00
Dan Pickett
1efaed5af1
Merge branch 'master' of github.com:lifo/docrails
2011-04-29 19:18:10 -04:00
Aditya Sanghi
36ee2bafec
fix typo
2011-04-29 09:53:02 +05:30
Aditya Sanghi
bf5cf5db86
:if should not fire on validations when not in context with :on
2011-04-29 02:54:37 +05:30
Myron Marston
7db7aa5053
Add additional tests for AM::ObserverArray that I had missed yesterday.
2011-04-28 08:32:22 -07:00
Myron Marston
fef22157b0
Fix bug with AM::Observer disablement.
...
Now that we propagate the enabling/disabling to descendants, we no longer have to check the disabled_observer Set on each superclass of the model class. This was causing a bug when disabling all observers at a superclass level and then enabling an individual observer at a subclass level.
Plus the logic is simpler now :).
2011-04-28 08:27:15 -07:00
Myron Marston
9a385394ac
Fix dev env memory leaks by using AS::DescendantsTracker rather than keeping track of subclasses manually.
...
There's also no need to keep track of all ObserverArray instances in a hash, as this is likely to leak memory, too.
2011-04-28 08:07:08 -07:00
Myron Marston
05d4653cef
Revert "Revert "Handle enabling/disabling observers at different levels of the class hierarchy.""
...
This reverts commit 2a25c5818b03d7d6cd63aad180bff23479dbd861.
I'm going to add another commit that keeps the same behavior of fixes
the problems of leaking memory in development.
2011-04-28 07:58:58 -07:00
José Valim
2a25c5818b
Revert "Handle enabling/disabling observers at different levels of the class hierarchy."
...
This reverts commit ad62f1928768bd2676958a4a08512bad342fe469 because the current
subclasses implementation leaks memory in development.
Instead of keeping an array of subclasses, the better solution is to
ask the parent if an observer is being disabled or not.
2011-04-28 09:32:57 +02:00
Myron Marston
ad62f19287
Handle enabling/disabling observers at different levels of the class hierarchy.
...
Last call wins.
2011-04-28 10:25:07 +08:00
Myron Marston
1f8cc446d9
Allow observers to be enabled and disabled.
...
This is useful in situations like model unit tests and the occasional rake task to backfill old data.
2011-04-28 10:23:49 +08:00
Myron Marston
5d20c0a64a
Wrap line that is over 200 characters long. Now it's much easier to read.
2011-04-28 10:23:48 +08:00
Sebastian Martinez
c4b494bdc4
Rephrased Dirty#changed? docs
2011-04-26 23:37:11 -03:00
Sebastian Martinez
4554983ab1
Removed extra whitespace
2011-04-26 23:29:11 -03:00
Sebastian Martinez
a2bfa5fa30
Better formatting on ActiveModel::Translation
2011-04-26 23:26:10 -03:00
Sven Fuchs
a5b0f7064c
bump the i18n gem to 0.6.0beta1 and update docs for the i18n exception handler [ #6739 state:committed]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-04-26 15:10:58 +02:00
Josh Kalderimis
bf40c729c6
minor correction to the AMo mass-assignment security docs
2011-04-24 09:58:12 +02:00
Josh Kalderimis
1054ebd613
AM mass assignment security attr_accessible and attr_protected now allow for scopes using :as => scope eg.
...
attr_accessible :name
attr_accessible :name, :admin, :as => :admin
2011-04-24 09:53:18 +02:00
Josh Kalderimis
0cf7b2f1b4
minor correction to the Active Model instantiate_observers doc
2011-04-22 15:24:11 +02:00
Xavier Noria
9b423ac0b7
let this regexp be stricter
...
The purpose of this regexp is to detect strings that
are valid identifiers to be used as method names.
The anchor $ allows a trailing newline, and both ^
and $ may be bypassed because Ruby regexps are
multiline always. The anchors \A and \z are the
proper ones to ensure string boundaries.
2011-04-19 18:16:38 +02:00
José Valim
dca31b9224
Let's not dup because value may not always be duplicable.
2011-04-19 18:06:01 +02:00
José Valim
30472d4244
Avoid define_method if possible.
2011-04-19 17:58:06 +02:00
Aaron Patterson
3e23752236
bcrypt will encrypt anything, so validate_presence_of would not catch nil / blank passwords. Thank you to Aleksander Kamil Modzelewski for reporting this
2011-04-14 14:54:25 -07:00
Brian Cardarella
a8365ab9ad
Declaring the attr_accessor for password_confirmation is not necessary
...
as the confirmation validation already adds that attr_accessor
2011-04-14 16:43:51 +08:00
Prem Sichanugrist
733bfa63f5
Remove #among?
from Active Support
...
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now.
It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
2011-04-13 20:25:28 +08:00
Xavier Noria
3366479a9a
Merge branch 'master' of git://github.com/lifo/docrails
2011-04-12 22:45:33 +02:00
David Heinemeier Hansson
d1575ae1b9
Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion!
2011-04-12 00:23:07 +02:00
Oge Nnadi
a43abfafd2
Rewording
2011-04-11 12:54:46 -07:00
José Valim
7379114c2f
Remove code duplication.
2011-04-11 18:01:10 +02:00
José Valim
df5691aa94
No need to rescue here. Invoking the wrong method in an object can happen anywhere if you are not careful. In other words, test your shit.
2011-04-11 17:47:59 +02:00
José Valim
5bf3d46bec
Revert "Add :use_include option to allow user to explicitly use Range#include?
method in Ruby 1.9"
...
Use :with => range.to_a instead.
This reverts commit f6540211b5b9133c9f93c11655a04d613c237e67.
2011-04-11 17:41:33 +02:00
Prem Sichanugrist
a9f3c9da01
Using Object#in? and Object#either? in various places
...
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
2011-04-11 03:17:09 +08:00
Prem Sichanugrist
f6540211b5
Add :use_include option to allow user to explicitly use Range#include?
method in Ruby 1.9
...
In Ruby 1.9 we're currently use `Range#cover?` to fix the performance problem. However, there might be the case that you want to use `Range#include?` instead. This patch will give you that option.
2011-04-10 18:49:28 +08:00
Prem Sichanugrist
58594be680
Add support for proc or lambda as an option for InclusionValidator, ExclusionValidator, and FormatValidator
...
You can now use a proc or lambda in :in option for InclusionValidator and ExclusionValidator, and :with, :without option for FormatValidator
2011-04-10 18:49:28 +08:00
John Firebaugh
d907f3cb5c
Rename test directory to match code directory
...
Hopefully "serializeration" is not an in joke that I missed.
2011-04-06 01:50:35 +08:00
Xavier Noria
3e24e9ebc2
Merge branch 'master' of git://github.com/lifo/docrails
2011-04-03 22:22:03 +02:00
Santiago Pastorino
99da42c299
Gem::Specification#has_rdoc= is deprecated since rubygems 1.7.0
2011-04-02 00:35:33 -03:00
Santiago Pastorino
4f90b28e06
Bring back AMo#i18n_key method
2011-03-30 16:29:43 -03:00
John Firebaugh
b671e4d86a
Fix formatting and broken markup
2011-03-28 22:31:05 -07:00
Santiago Pastorino
450f7cf01b
use class_eval with a string when it's possible
2011-03-22 20:11:36 -03:00
Santiago Pastorino
da6c7bd4b4
Do not in place modify what table_name returns
2011-03-22 19:36:16 -03:00
Santiago Pastorino
445241d713
define_attr_method should be able to define methods that returns nil
2011-03-17 23:17:20 -03:00
Aaron Patterson
4532b39f5f
remove misleading comment
2011-03-17 10:31:12 -07:00
Aaron Patterson
00f0879367
dup strings on return so that in place modifications do not break anything. I am looking at you "compute_table_name"
2011-03-17 10:26:11 -07:00
Santiago Pastorino
c834a751d2
define_attr_method correctly defines methods with invalid identifiers
2011-03-16 21:20:44 -03:00
Santiago Pastorino
fda45f4fc4
Add a define_attr_method test
2011-03-16 21:08:02 -03:00
Santiago Pastorino
5232077517
Add test for define_attr_method using as name an invalid identifier
2011-03-16 21:01:49 -03:00
Santiago Pastorino
cb44e99de4
Add test for define_attribute_method using as name an invalid identifier
2011-03-16 21:01:04 -03:00
Andrew White
e8458d37c5
Fix typo in assertion message
2011-03-16 10:28:40 +00:00
Norman Clarke
7bd70dcd6c
Add messages to plain assertions.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-15 10:44:14 -03:00
Santiago Pastorino
157c37f558
Refactor length validation
2011-03-12 21:12:44 -02:00
Andriy Tyurnikov
f48d3d4df6
length validation for fixnums
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-12 21:12:44 -02:00
Mike Gehard
58de03f077
Add additional text to NotImplementedErrors [ #6328 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-12 13:43:23 -02:00
Xavier Noria
89ecc0a5dc
Merge branch 'master' of git://github.com/lifo/docrails
2011-03-07 22:11:47 +01:00
Vijay Dev
f99db5a6a8
formatting changes
2011-03-07 23:56:16 +05:30
Paco Guzman
8e0affbd86
Configuration options are symbols
2011-03-06 22:35:26 +01:00