Commit Graph

889 Commits

Author SHA1 Message Date
Grant Hutchins e78c5eeba1 Fix comments about to_partial_path 2012-03-10 17:40:27 -05:00
Carlos Antonio da Silva 3508da50f0 Rename variable to avoid using name "include"
Better syntax highlight :)
2012-03-09 22:07:59 -03:00
Carlos Antonio da Silva 3d04d726fd Remove Array#wrap usage in AMo serialization 2012-03-09 21:56:05 -03:00
Carlos Antonio da Silva 10c3304db6 Make sure serializable hash with :include always returns string keys 2012-03-09 21:51:12 -03:00
José Valim 225eff9d61 Merge pull request #5351 from shanna/master
Missing active_model/naming.rb dependency.
2012-03-08 23:26:48 -08:00
Shane Hanna 2b97b8fb9e Added missing ActiveModel::Naming dependency.
ActiveModel::Name constructor expects to be able to call #blank? on a
String but the core Object#blank? extension is never required.
2012-03-09 15:46:24 +11:00
Rafael Mendonça França d804790634 Fix my name in the CHANGELOG to follow the convention
Also add missing entries and use the formating convention
2012-03-09 00:54:21 -03:00
Vijay Dev db6542178c changelog updates for Rails 4 [ci skip] 2012-03-09 02:22:17 +05:30
Vijay Dev 188d1d2787 Merge branch 'master' of github.com:lifo/docrails 2012-03-09 00:07:59 +05:30
Carlos Antonio da Silva e64dbb5b36 Improve docs for attr_accessible|protected related to Hash#except|slice 2012-03-06 23:52:03 -03:00
Vijay Dev c0a7999115 minor corrections in AMo::Model docs [ci skip] 2012-03-05 22:46:44 +05:30
Guillermo Iguaran 247706e259 Use public_send instead of send in ActiveModel::Model initialize 2012-03-03 10:36:03 -05:00
Carlos Antonio da Silva cb9d03f0d4 Add docs with usage examples for ActiveModel::Model
Also add test to ensure basic model does not explode when
initialized with nil.
2012-03-03 04:45:30 -03:00
Guillermo Iguaran 3b822e91d1 Add ActiveModel::Model, a mixin to make Ruby objects to work with AP inmediatly 2012-03-02 23:59:55 -05:00
claudiob 05c6caf48c Add release dates to documentation
Set "March 1, 2012" as the release date for 3.2.2, 3.1.4, 3.0.12
2012-03-01 11:20:03 -08:00
Paco Guzman 152a393d4f Update changelogs with rails 3.0-stable branch info 2012-02-25 13:50:08 +01:00
Xavier Noria 7f2548e34d Merge pull request #5130 from dlee/revised_patch_verb
Add config.default_method_for_update to support PATCH
2012-02-22 09:00:53 -08:00
David Lee 002713c645 Add config.default_method_for_update to support PATCH
PATCH is the correct HTML verb to map to the #update action. The
semantics for PATCH allows for partial updates, whereas PUT requires a
complete replacement.

Changes:
* adds config.default_method_for_update you can set to :patch
* optionally use PATCH instead of PUT in resource routes and forms
* adds the #patch verb to routes to detect PATCH requests
* adds #patch? to Request
* changes documentation and comments to indicate support for PATCH

This change maintains complete backwards compatibility by keeping :put
as the default for config.default_method_for_update.
2012-02-22 08:47:10 -08:00
Benjamin Quorning 5742f12b78 Prefer || over 'or' for boolean operations 2012-02-22 10:13:27 +01:00
Aaron Patterson 5d0c1814ad ruby 2.0 makes protected methods return false for respond_to, so pass true as the second param 2012-02-21 10:33:16 -08:00
Bogdan Gusiev 534dc4ca1a AM::Errors: allow :full_messages parameter for #as_json 2012-02-20 11:17:11 +02:00
Fabio Yamate d204918f91 Fix sanitize_for_mass_assigment when role is nil
There is an example in Rails documentation that suggests implementing
assign_attributes method for ActiveModel interface, that by default
sends option role with nil. Since mass_assignment_authorizer never
is called without args, we can move the default value internally.
2012-02-15 11:13:54 -02:00
Sergey Nartimov b5f5e279a6 remove unnecessary require core_ext/string/encoding 2012-02-14 10:09:21 +03:00
Aaron Patterson 9bcfb1a974 Merge pull request #5018 from hammerdr/issue-4659-docs
Adding documentation to clarify usage of attributes hash.
2012-02-13 09:00:59 -08:00
Carlos Antonio da Silva ad9f968c4a Make sure serializable hash with :methods option returns always string keys 2012-02-13 11:22:59 -02:00
Carlos Antonio da Silva 5bcb4e3c18 Cleanup extra spaces 2012-02-13 11:20:19 -02:00
Derek Hammer a3a1a6f9ed Missed a code example. Fixing the docs to be consistant. 2012-02-12 08:17:18 -06:00
Derek Hammer a469ec787c Adding documentation to clarify usage of attributes hash.
Serialization uses only the attributes hash's keys and calls
methods that are of the same name as the keys on the serialized
object.
2012-02-12 08:08:09 -06:00
Vijay Dev e6c98b83cb Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	activerecord/lib/active_record/relation/query_methods.rb
2012-02-09 23:44:17 +05:30
prasath 848ee296ec test title changed corresponding to the test 2012-02-09 02:11:36 +05:30
Aaron Patterson 06b9c905a9 Merge pull request #4930 from ask4prasath/ordered_hash_replaced
Replacing ordered hash to ruby hash on active model
2012-02-08 08:59:00 -08:00
Carlos Antonio da Silva 9296996029 Fixes in AMo README 2012-02-07 20:29:14 -02:00
José Valim 91bb008c0b Update README to mention lint. 2012-02-07 23:17:24 +01:00
José Valim a17d047a73 Trim down Active Model API by removing valid? and errors.full_messages 2012-02-07 23:10:43 +01:00
prasath 47628ec128 replacing ordered hash to ruby hash 2012-02-08 00:34:47 +05:30
Niels Ganser 60dad828ae To infinity… and beyond!
Allow infinite values for validates_length_of. Particularly useful
for prettily defining an open ended range such as

validates_length_of :human_stupidity, :within => 0..Float::INFINITY
2012-02-06 12:58:32 +01:00
José Valim b41ef0a448 Merge pull request #4866 from bogdan/terminate_after_callbacks
AS::Callbacks#define_callbacks: add :terminate_after_callbacks option
2012-02-04 02:53:47 -08:00
Bogdan Gusiev 7661955634 AS::Callbacks: :skip_after_callbacks_if_terminated option 2012-02-03 17:57:53 +02:00
Arun Agrawal bfb84cfb3e Verbose output for tests.
See #3892
2012-02-03 08:01:24 -05:00
Vijay Dev d7a85c5c51 revise docs [ci skip] 2012-02-01 23:31:43 +05:30
Carlos Antonio da Silva 26861e9506 Generate strict validation error messages with attribute name 2012-02-01 11:34:17 -02:00
Aaron Patterson 2fd9816851 Merge pull request #4709 from ask4prasath/refactor_validation_test
Removed unwanted intializer and replaced with ruby default collect method
2012-01-27 09:09:33 -08:00
Aaron Beckerman 9d119c5fee fix example code in documentation for has_secure_password 2012-01-28 00:53:02 +11:00
prasath f4d9ba0296 Removed unwanted intializer and replaced with ruby default collect method 2012-01-27 00:13:46 +05:30
claudiob 6d426b1035 Add release date of Rails 3.2.0 to documentation 2012-01-26 01:53:38 -08:00
Vijay Dev 203771da9e Merge branch 'master' of github.com:lifo/docrails 2012-01-26 00:00:40 +05:30
Aaron Patterson c421870c7a Merge pull request #4644 from ask4prasath/refactor_test
Replaced unwanted method and added to accessor for getter history
2012-01-25 09:40:45 -08:00
Jonathan del Strother 73e71c27f2 Fix translate_error reference for Error#add documentation 2012-01-25 15:02:20 +00:00
prasath bf31d7b224 Removing unwanted method and adding to accessor for getter history 2012-01-25 01:34:04 +05:30
Manoj 204aabc24c quote fix ` to ' in the ArgumentError message
message quote fix
2012-01-24 22:10:06 +05:30