Commit Graph

961 Commits

Author SHA1 Message Date
Francesco Rodriguez
9f3637fad5 adding observer example 2012-05-07 00:33:26 -05:00
Vijay Dev
3d9673d8f6 Merge branch 'master' of github.com:lifo/docrails 2012-05-04 17:51:15 +05:30
Alexey Vakhov
616de66c55 Fix ActiveModel README example 2012-05-04 12:32:35 +04:00
Roman V. Babenko
84feca4aaa Rakefile executable attributes and shebang lines has been removed 2012-05-02 13:38:13 +03:00
Vijay Dev
42ff22f33a Merge branch 'master' of github.com:lifo/docrails 2012-05-01 19:06:03 +05:30
Edward Tsech
6e8f2be51a Add line which gives a little bit more information how *_will_change! works. 2012-05-01 13:52:21 +02:00
Marc-Andre Lafortune
dc74f0cb1b notify_observers should be public 2012-04-30 22:13:26 -04:00
Aaron Patterson
206b43a954 Merge pull request #6063 from marcandre/observer_extra_args
Allow extra arguments for Observers
2012-04-30 16:43:22 -07:00
Marc-Andre Lafortune
24c068d67d Allow extra arguments for Observers 2012-04-30 18:10:03 -04:00
Arun Agrawal
7f248076a3 build fix for observing_test.rb
introduced here 17c990b153f8635874c006a7460ee95817543fc1
2012-04-30 15:27:18 +05:30
Santiago Pastorino
4cff1a2809 Merge pull request #6072 from marcandre/observer_simplify_test
Observer: simplify tests
2012-04-30 00:15:51 -07:00
Jeremy Kemper
0393c7cd51 Merge pull request #6071 from marcandre/observer_redef
Fix Observer by acting on singleton class. Fixes #3505.
2012-04-29 21:10:15 -07:00
Marc-Andre Lafortune
17c990b153 Observer: simplify tests 2012-04-29 22:02:02 -04:00
Marc-Andre Lafortune
bad44e4f8f Fix Observer by acting on singleton class [#3505]
Also [issue #1034] [pull #6068]
2012-04-29 21:51:50 -04:00
Aaron Patterson
f975a8663e Merge pull request #5942 from bcardarella/confirmation_error_message_on_confirmation_attribute
confirmation validation error attribute
2012-04-29 16:29:33 -07:00
Marc-Andre Lafortune
569fb1fffb Generate appropriate error more judiciously 2012-04-29 00:51:56 -04:00
Marc-Andre Lafortune
85c056cc1f Fix error message:
- can pass the class, not the instance
- "instance method" is confusing, use "method :instance" instead
2012-04-28 23:20:42 -04:00
Carlos Antonio da Silva
f48d83b599 Refactor human attribute name 2012-04-28 12:14:59 -03:00
Carlos Antonio da Silva
cafe6a38f5 Do not modify options hash in human_attribute_name, remove reverse_merge 2012-04-28 11:23:29 -03:00
José Valim
fc6b115b88 Merge pull request #6025 from carlosantoniodasilva/amo-errors-refactor
Refactor AMo::Errors
2012-04-28 00:17:18 -07:00
Carlos Antonio da Silva
709b748f09 Refactor AMo::Errors
* Use merge!, remove reverse_merge
* Use case statement instead of is_a? checks
2012-04-27 21:04:13 -03:00
Carlos Antonio da Silva
9d1f6edbe0 Return earlier if attribute already changed in *_will_change! methods
Avoid obtaining the value and duplicating it when possible.
2012-04-27 20:44:09 -03:00
Vijay Dev
43af34c0f6 Merge branch 'master' of github.com:lifo/docrails 2012-04-28 00:56:17 +05:30
Mark Rushakof
8cc4159018 Use <tt>Foo::Bar</tt> instead of +Foo::Bar+
The latter doesn't render as code in HTML output.

Regex used in Rubymine to locate the latter form:

    (\+)(:*\w+:(?::|\w)+)(\+)
2012-04-27 00:00:30 -07:00
Oscar Del Ben
8c16333286 minor docs improvements 2012-04-26 10:34:51 +02:00
Oscar Del Ben
26353b993b Add documentation for validate options 2012-04-26 10:09:12 +02:00
Oscar Del Ben
b2ccae466e Enhance validations documentation 2012-04-26 09:35:26 +02:00
Vijay Dev
cd65682835 Merge pull request #5878 from oscardelben/refactor_observed_class
Refactor Observer.observed_class
2012-04-25 06:06:14 -07:00
Vijay Dev
4a3ce153f1 Merge branch 'master' of github.com:lifo/docrails 2012-04-25 18:33:36 +05:30
Oscar Del Ben
9072a08fac Refactor Observer.observed_class 2012-04-25 14:46:59 +02:00
Oscar Del Ben
f9f52435e7 fix code syntax 2012-04-25 12:14:08 +02:00
Oscar Del Ben
d089ee8639 Add include documentation to serialization 2012-04-25 12:00:19 +02:00
Oscar Del Ben
a631dd97cb Minor refactor of serializable hash 2012-04-25 11:46:47 +02:00
Oscar Del Ben
e34a4014ad improve serialization doc 2012-04-25 11:27:09 +02:00
José Valim
cd556c9388 Merge pull request #5841 from oscardelben/rename_count_observers
Rename Observing#count_observers to Observing#observers_count
2012-04-24 23:09:48 -07:00
José Valim
0cc32c5fd7 Merge pull request #5966 from oscardelben/fix_secure_password_setter
Fix secure_password setter
2012-04-24 10:50:44 -07:00
Oscar Del Ben
692b3b6b6a Fix secure_password setter 2012-04-24 19:16:01 +02:00
Oscar Del Ben
52188c77f1 Correct documentation of SecurePassword 2012-04-24 19:08:57 +02:00
Oscar Del Ben
ffa974d55c Refactor SecurePassword#authenticate 2012-04-24 19:03:59 +02:00
Brian Cardarella
4433b1a99a Support i18n attributes for confirmation 2012-04-24 01:05:41 -04:00
Brian Cardarella
3a749a9bd1 Reordered changelog entry 2012-04-23 21:30:24 -04:00
Brian Cardarella
d32cbee2b3 Updated CHANGELOG 2012-04-23 21:04:10 -04:00
Brian Cardarella
fcc534ed76 confirmation validation error attribute
This will render the error message on :#{attribute}_confirmation instead
of on attribute itself. When rendering confirmation errors inline on the
form with form builders such as SimpleForm and Formtastic it is
confusing to the ender user to see the confirmation error message on the
attribute element. Instead it makes more sense to have this validation
error render on the confirmation field instead.

The i18n message has been updated for the confirmation validator error
message to include the original attribute name.
2012-04-23 17:16:05 -04:00
Bernard Kroes
be4a44f1f9 Fixed expected value in comment. Removed duplicate lines in example. 2012-04-21 22:16:38 +02:00
Oscar Del Ben
7536731a9a Improve observers documentation 2012-04-18 15:23:06 +02:00
Vijay Dev
5b336ff443 Merge branch 'master' of github.com:lifo/docrails 2012-04-18 00:10:06 +05:30
Thibaut Courouble
0c948a587d Fix confusing example in ActiveModel::Errors 2012-04-17 19:02:40 +03:00
Jan Xie
6e8a1bd0d3 fix ActiveModel::Validations::Callbacks doc 2012-04-15 20:42:58 +08:00
Michael de Silva
0631b26316 fix bad format [ci skip] 2012-04-14 11:58:43 +03:00
Oscar Del Ben
978221b99c Rename notify_observers argument *arg to *args to make it more clear
that the method accepts multiple arguments
2012-04-14 10:54:10 +02:00