Commit Graph

1325 Commits

Author SHA1 Message Date
Rajarshi Das
782d794c20 use assert_empty in activemodel conditional validation test cases 2013-09-10 17:26:39 +05:30
Rajarshi Das
e21a18bed0 fix actionview and activemodel test cases typos 2013-09-05 14:21:57 +05:30
Gaurish Sharma
65f1766a08 Add :nodoc: to ActiveModel::SecurePassword.min_cost
[ci skip]
2013-08-29 01:27:18 +05:30
Rajarshi Das
9f478deaab remove unused instance variable 2013-08-23 16:04:08 +05:30
Guillermo Iguaran
99e33c03b7 Dont' check for any order in hash since we aren't sorting it and this is determinated only by the used interpreter 2013-08-18 16:40:21 -05:00
Guillermo Iguaran
c40111c346 Refactor serialization test for hash order 2013-08-18 09:04:09 -05:00
Gaurish Sharma
90c450f6cd Avoid Skip in test, have a unified test for order 2013-08-09 15:27:21 +05:30
Gaurish Sharma
9f8116fb77 Add tests for ActiveModel::Serializers::JSON#as_json ordering 2013-08-09 04:32:00 +05:30
Ryoji Yoshioka
23ef1dfd70 Fix: documentation for ActiveModel::Errors 2013-08-05 18:58:22 +09:00
Max Shytikov
af1e3b7c48 fix tests 2013-07-30 20:03:57 +03:00
Arun Agrawal
f52832de2a grab executable from rubygems
As done here d7fc97d3f90c0e30865d32ce202658f03248cacc
2013-07-26 11:07:25 +02:00
Vladimir Kiselev
3be0cdfa55 Fix secure_password password_confirmation validations 2013-07-24 03:14:15 +04:00
Burkhard Vogel-Kreykenbohm
ad62cf68f8 bcrypt-ruby stable is 3.1 2013-07-17 16:39:07 +02:00
John Gesimondo
0e945f8909 it's xml, not json
change docs for xml serializer to talk about xml
2013-07-13 16:25:04 -07:00
Ankit Gupta-FIR
6a71d09ad2 Replaced older rocket sign to new : 2013-07-04 17:25:50 +01:00
Aaron Patterson
09b31f08d4 eagerly initialize the attributes module to avoid check-then-set race conditions 2013-07-02 14:34:40 -07:00
Aaron Patterson
4c88f4ce16 remove wrong documentation from a :nodoc:'d method 2013-07-02 14:04:40 -07:00
Aaron Patterson
d094aaad19 the data structure used to store attribute aliases should not be exposed 2013-07-01 16:23:08 -07:00
Vipul A M
404a61e19c Remove redundant escapes from xml serialization test 2013-07-01 10:17:33 +05:30
Steven Yang
6e583cdac3 fix typo in ActiveModel::Error docs [ci skip] 2013-06-30 18:38:29 -03:00
Steven Yang
5fe43ffcfb remove evals from AM::Validations::Callbacks
follow the same refactor at a63a964a5d1ed02cf0df1b1a33a96ed2a9fa987b
2013-06-30 18:47:55 +08:00
Steven Yang
e8fe6660d2 provide a more sementicthe local variables name for ActiveModel::Validations::Clusivity#include? method
the original name `exclusion` is a bit confusing when using with the method `inclusion_method`
rename it to a more logic neutral name.
2013-06-29 18:36:40 +08:00
Paul Nikitochkin
e63ba910ae Remove deprecation warning from AttributeMethodsMatcher 2013-06-28 00:16:42 +03:00
Łukasz Strzałkowski
468939297d Remove deprecated attr_protected/accessible
Rails 4.0 has removed attr_protected and attr_accessible feature in favor of Strong Parameters.
2013-06-27 20:38:30 +02:00
Carlos Antonio da Silva
48ab2c06e0 Merge pull request #11054 from senny/11048_make_default_value_explicit
make default value for `:message` on `AM::Errors` explicit.
2013-06-27 05:16:38 -07:00
Carlos Antonio da Silva
61346d1b42 Merge pull request #10774 from chuckbergeron/validates-inclusion-of-accuracy-for-non-numeric-ranges
Greater accuracy for validates_inclusion_of on non-numeric ranges

Closes #10774, fixes #10593
2013-06-25 21:48:41 -03:00
Akshay Khole
444d3412b9 Fixing Issue #11083
Removing other occurrences of `the` appearing twice
2013-06-25 16:47:29 +05:30
Rajarshi Das
cbd4a2e317 replace all older rocket sign to new ":" from examples of active record and active models 2013-06-24 11:19:51 +05:30
José Valim
e1f4f64434 Revert "Merge pull request #11053 from yangchenyun/mine"
Those two files are required by active_support/rails.rb
loaded in active_model.rb

It is common to require common dependencies on the root
files to avoid boilerplate in each file.

This reverts commit 763635e30f17800ebc0a8ae98d780edc8ebfb4e5, reversing
changes made to 4f46ef36aaef217834f3f96d3689d32f6a6761ea.
2013-06-22 18:36:26 +02:00
Yves Senn
ca99ab2481 make default value for :message on AM::Errors explicit. 2013-06-22 13:48:42 +02:00
Yves Senn
763635e30f Merge pull request #11053 from yangchenyun/mine
Add explicit dependencies of ActiveSupport to enable independent usage of ActiveModel::Name
2013-06-22 03:32:15 -07:00
Steven Yang
c20b5ca037 add explicit AS dependencies for ActiveModel::Naming
There are two missing ActiveSupport dependencies to use ActiveModel::Name class or ActiveModel::Naming module independently.

Missing dependencies for Module#delegate defined in `active_support/core_ext/module/delegation`, used at [L148](https://github.com/rails/rails/blob/master/activemodel/lib/active_model/naming.rb#L148)

Missing dependencies for Object#blank? defined in `active_support/core_ext/object/blank`, used at [L131](https://github.com/rails/rails/blob/master/activemodel/lib/active_model/naming.rb#L131)
2013-06-22 18:24:29 +08:00
Arun Agrawal
67f668845e Saying gemcutter => rubygems [ci skip] 2013-06-21 11:04:52 +02:00
Fred Wu
85750d43fa ActiveModel::Model inclusion chain backward compatibility 2013-06-20 12:16:17 +10:00
Fred Wu
0b502cb879 Fixes AciveModel::Model with no ancestors, fixes #11004
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2013-06-19 17:16:04 +02:00
Fred Wu
e3dc10f133 Fixed ActiveModel::Model's inclusion chain 2013-06-19 11:25:10 +10:00
Aaron Patterson
47617ecdf7 expose a few attribute changed methods 2013-06-11 13:39:46 -07:00
Aaron Patterson
a63a964a5d remove some evals from callback conditionals 2013-06-11 10:20:29 -07:00
Daichi Arai
d61241b060 fix ActiveModel::Validations.validators_on doc 2013-06-10 18:34:34 +09:00
Carlos Antonio da Silva
94725b81f5 Merge pull request #10860 from ka8725/activemodel_log
Ignore activemodel/log/ folder
2013-06-07 05:27:29 -07:00
Richard Livsey
9906eb1355 Docfix: Use public interface instead of setting instance variables
Dynamically setting instance variables based on user input probably isn't a great idea. Better to go through the setter methods provided by attr_accessor.
2013-06-07 12:41:05 +02:00
Andrey Koleshko
120f6e07f6 Stub logger for tests 2013-06-06 19:47:57 +03:00
Arun Agrawal
a84a08ecea No need to load 'rake/packagetask' as it's already
in 'rubygems/package_task'
2013-06-02 20:41:21 +02:00
Phil Calvin
5d93ef8f45 Fix regression in has_secure_password.
If the confirmation was blank, but the password wasn't, it would still save.
2013-05-30 11:18:43 -07:00
Charles Bergeron
0317b93c17 Use Range#cover? for Numeric ranges (tests via endpoints) and use Range#include? for non-numeric ranges
added changelog message
2013-05-27 23:54:25 -07:00
Nick Sutterer
7d84c3a2f7 deprecate Validator#setup (to get rid of a respond_to call). validators do their setup in their constructor now. 2013-05-23 10:00:44 -03:00
Aaron Patterson
9fef7c8dc9 Merge pull request #10527 from zenspider/squishy_minitest5
Squishy minitest5
2013-05-16 13:41:54 -07:00
Aaron Patterson
ba55276434 deprecating string based terminators 2013-05-14 16:03:09 -07:00
Aaron Patterson
d53b5f0739 Merge branch 'master' into normalizecb
* master: (61 commits)
  add tests for reset_calbacks
  Fixing build broken by this change
  Extract variable out of loop
  Updated comment to Rails 4
  Fixes NoMethodError: `alias_method_chain` when requiring just active_support/core_ext
  better error message when app name is not passed in `rails new`
  Code cleanup for ActionDispatch::Flash#call
  Fix typo: require -> requires
  Add CHANGELOG entry for #10576
  Merge pull request #10556 from Empact/deprecate-schema-statements-distinct
  Some editorial changes on the documentation.
  respond_to -> respond to in a message from AM::Lint
  specify that dom_(id|class) are deprecated in controllers, views are fine
  copy edits [ci skip]
  Fix class and method name typos
  Replace multi_json with json
  ruby -> Ruby
  Adding documentation to the automatic inverse_of finder.
  Improve CHANGELOG entry [ci kip]
  Call assume_migrated_upto_version on connection
  ...

Conflicts:
	activesupport/lib/active_support/callbacks.rb
2013-05-13 11:51:10 -07:00
Xavier Noria
19c6c8f5d7 respond_to -> respond to in a message from AM::Lint
The error message uses English to say that the object should respond
to a certain method. You check that with respond_to, but that's not
English.

This makes this error message also consistent with the rest.
2013-05-12 13:59:51 +02:00