Josh Kalderimis
1c129f8f8e
separated the asset id methods to a separate module, removed some dupliation with the various path methods, and moved the base asset tag methods to a base module so the asset id module can play nice with the path generation
2010-11-16 00:04:36 +01:00
Josh Kalderimis
91b0b65834
split the javascript and stylesheet tag helpers into separate files as a precusor before removing the duplication between the two
2010-11-16 00:04:36 +01:00
Aaron Patterson
2b2082eb09
rejecting blank strings
2010-11-15 15:02:18 -08:00
Aaron Patterson
e4591489d1
reduce method calls
2010-11-15 14:22:06 -08:00
Aaron Patterson
0be181bfa0
make sure we are only doing sanity checking against regular expressions
2010-11-15 13:37:27 -08:00
Xavier Noria
91a6db90cf
Merge branch 'master' of git://github.com/lifo/docrails
2010-11-15 19:45:46 +01:00
Ryan Bigg
8b5700192e
Merge branch 'master' of github.com:lifo/docrails
...
* 'master' of github.com:lifo/docrails:
Getting Started guide: remove calls to f.error_messages as it has been removed from Rails
deliver_* is no more
removed unnecessary indentation
added note with example for using flash in redirection
corrected sample code to clear @_current_user class variable also
the partial option is not required for simple partial rendering
colorize_logging is a Rails General Configuration option not a specific option of ActiveRecord
Fixed the name of the 'generator option'
this reads better, i don't know what the other 'so on' are, doesn't help reader imho
added missing word to clear up meaning in my previous commit
Add a note to TextHelpers making explicit their default behavior of not escaping but sanitizing.
removed indentation, for code style consistency and readibility
Use Rails.logger, not ActiveRecord::Base.logger
removed etc. not require
added missing space and minor rewording
corrected to Rails 3 syntax for declaring resources
Fixes ActionMailer example error
2010-11-15 11:44:04 +08:00
Santiago Pastorino
0262218976
Add f.submit to forms just to show the most common use case
2010-11-14 21:40:34 -02:00
Santiago Pastorino
bdf70fd379
Merge branch 'spastorino-master'
2010-11-14 21:28:11 -02:00
Santiago Pastorino
f597d1ec80
This doesn't make sense here
2010-11-14 21:25:37 -02:00
Santiago Pastorino
4ef6d2e534
Add empty line between previous method and RDoc of submit to allow RDoc appear on api.rubyonrails.org
2010-11-14 21:01:59 -02:00
Ryan Bigg
74061f55be
Document the constraints method
2010-11-14 07:32:54 +08:00
Santiago Pastorino
293c8a4de5
Tests added for rendering partial with layout, when the partial contains another render layout with block call added missing fixtures
2010-11-13 13:40:36 -02:00
Santiago Pastorino
e3b68e5f6b
Tests added for rendering partial with layout, when the partial contains another render layout with block call
2010-11-13 13:38:40 -02:00
Santiago Pastorino
27f4ffd11a
Make collection and collection_from_object methods return an array
...
This transforms for instance scoped objects into arrays and avoid unneeded queries
[#5958 state:committed]
2010-11-13 04:02:57 -02:00
Ryan Bigg
fe8446fcce
Add documentation for :path_names option on resources
2010-11-13 11:16:32 +08:00
Ryan Bigg
95f41fe12e
See the scope method for documentation for namespace's shallow_path option
2010-11-13 11:16:06 +08:00
Ryan Bigg
b235519777
Add documentation for the mount method in ActionDispatch's Mapper
2010-11-13 11:15:17 +08:00
Neeraj Singh
793967cd40
provide better error message if path is uri [ #5914 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-11 17:27:47 +01:00
Neeraj Singh
fbaf3a23d9
fields_for should treat ActiveRecord::Relation as an array
...
[#5795 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-11 17:14:47 +01:00
José Valim
a897402863
Remove inline comment.
2010-11-11 17:07:06 +01:00
Marcelo Giorgi
2bb1c202b4
Make after_filter halt when before_filter renders or redirects [ #5648 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-11 17:05:07 +01:00
Carlos Antonio da Silva
7846fb79e1
Fix render partial with layout and no block
...
When using a render :partial with :layout call, without giving a block,
if the given :partial had another render :partial call, the layout was
not being rendered. This commit fixes this context by storing variables
before rendering the partial, so they are not overrided in any successive
call to render partials down the path. All ActionPack tests are ok.
2010-11-11 16:22:39 +01:00
Carlos Antonio da Silva
50c7aab996
Fix issue with rendering partials and then yielding inside a render layout call
...
The given block was never being executed when another render :partial call
existed before the yield call, due to the block being overriden.
This commit also adds some more tests to render with :layout option.
2010-11-11 16:22:39 +01:00
Aditya Sanghi
920660b19c
patching to ensure separator is printed with order [ #5816 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-11 12:22:15 -02:00
José Valim
9c9f416d39
Allow AR Session Store to be renewed
2010-11-11 14:17:14 +01:00
Xavier Noria
41366cdec6
syncs CHANGELOGs for 3.0.2 in 3-0-stable with the ones in master
2010-11-09 20:56:41 +01:00
Xavier Noria
f57b5197b3
registers number_to_currency's :negative_format in the CHANGELOG
2010-11-09 09:37:32 +01:00
Andrew White
ef46b9f21a
Strip regexp anchors from rake routes output [ #5934 state:resolved]
2010-11-09 05:24:10 +00:00
José Valim
645f515843
Add a note to TextHelpers making explicit their default behavior of not escaping but sanitizing.
2010-11-08 01:47:49 -08:00
Michael Koziarski
9ecaa80300
Make safe_append= live on AV::OutputBuffer not AS::SafeBuffer
...
Conflicts:
actionpack/lib/action_view/template/handlers/erb.rb
2010-11-08 10:10:30 +13:00
Jan Maurits Faber
f04ec6a227
Added support for Erubis <%== tag
...
<%== x %> is syntactic sugar for <%= raw(x) %>
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#5918 status:committed]
2010-11-08 09:55:55 +13:00
David Trasbo
990f52ebd7
Make cookies hash in ActionDispatch::TestProcess indifferent access [ #5761 state:committed]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-07 14:48:51 -02:00
Ryan Bigg
b591989b5f
Fix indentation for :as option documentation on the namespace method
2010-11-07 12:22:39 +10:00
Ryan Bigg
ff3a494e2e
Document the :shallow_path option for scope
2010-11-07 12:21:56 +10:00
Ryan Bigg
e6aed6b6a8
Indent final comment for :path option
2010-11-07 12:18:19 +10:00
Ryan Bigg
ee646788fc
Indent code example for :as option
2010-11-07 12:17:36 +10:00
Ryan Bigg
7d83673134
Document the :as option for the scope method
2010-11-07 12:11:39 +10:00
Ryan Bigg
ffe97e338e
Space between module option documentation and path documentation
2010-11-07 12:09:58 +10:00
Ryan Bigg
4a6150a3eb
Fix indentation on comment for :path option
2010-11-07 12:09:38 +10:00
Ryan Bigg
6ca042b3e4
Document the :as option for the namespace method
2010-11-07 12:07:41 +10:00
Ryan Bigg
66d1276d7f
Document the :module option for namespace
2010-11-07 12:05:55 +10:00
Ryan Bigg
0eef4e3bfb
Document the :path option for namespace
2010-11-07 12:05:14 +10:00
Ryan Bigg
379939e1e0
Begin to document the namespace method for AD's Mapper
2010-11-07 12:04:25 +10:00
Ryan Bigg
e5eece41b5
Document the controller method for AD's Mapper
2010-11-07 11:49:57 +10:00
Ryan Bigg
5f7f3adccd
Document the defaults method
2010-11-07 11:39:57 +10:00
Ryan Bigg
5040ecbfea
Document the :module and :path options for the scope method.
2010-11-07 11:39:55 +10:00
Ryan Bigg
35c7ca5c37
Separate comments and examples with "Examples" header.
2010-11-07 11:39:53 +10:00
Ryan Bigg
433e1aca86
Fix where the documentation says "photos", but the example shows "posts" or "comments" by switching both to simply "posts"
2010-11-07 11:39:50 +10:00
Ryan Bigg
203e45cd7f
Add further documentation + examples for the get, post, put and delete methods in ActionDispatch::Routing::Mapper::HttpHelpers
2010-11-07 11:39:27 +10:00
Santiago Pastorino
46332e458c
Move @assigns from the controller to the test itself
2010-11-06 21:15:59 -02:00
Santiago Pastorino
2382667955
Fix problems trying to functional test AC::Metal controllers
...
[#5393 state:committed]
2010-11-06 21:15:03 -02:00
Chris Eppstein
b1667c7c2c
Correctly handle the case of an API response that returns a hash by treating a single hash argument as the resource instead of as options.
2010-11-06 06:56:36 +08:00
Santiago Pastorino
d7ec94f665
Just initialize options with an empty hash
2010-11-03 17:20:02 -02:00
Xavier Noria
208fb2920d
made a pass to the docs of :negative_format
2010-11-03 06:20:26 +01:00
Don Wilson
c4d977fbbc
Added :negative_format option to number_to_currency function [ #5894 state:resolved]
...
Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
2010-11-02 23:00:23 +00:00
Santiago Pastorino
3c7215bdce
Test that capture doesn't escape twice
2010-11-02 20:02:55 -02:00
Santiago Pastorino
72d12d9455
Call as ERB::Util.html_escape since is not the module is not included here
2010-11-02 20:02:13 -02:00
Jeff Kreeftmeijer
bb9c58eb4a
Make sure capture's output gets html_escaped [ #5545 state:resolved]
...
Also remove a duplicate test_link_to_unless assertion and add .html_safe to the
remaining one.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-02 19:38:28 -02:00
Andrew White
d446392f76
Add additional HTTP request methods from the following RFCs:
...
* Hypertext Transfer Protocol -- HTTP/1.1
http://www.ietf.org/rfc/rfc2616.txt )
* HTTP Extensions for Distributed Authoring -- WEBDAV
http://www.ietf.org/rfc/rfc2518.txt
* Versioning Extensions to WebDAV
http://www.ietf.org/rfc/rfc3253.txt
* Ordered Collections Protocol (WebDAV)
http://www.ietf.org/rfc/rfc3648.txt
* Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol
http://www.ietf.org/rfc/rfc3744.txt
* Web Distributed Authoring and Versioning (WebDAV) SEARCH
http://www.ietf.org/rfc/rfc5323.txt
* PATCH Method for HTTP
http://www.ietf.org/rfc/rfc5789.txt
[#2809 state:resolved] [#5895 state:resolved]
2010-11-02 10:56:14 +00:00
Andrew White
47ceb135c6
Ensure that Rails.env is defined first
2010-10-27 10:30:14 +01:00
José Valim
2a90a4e51c
Use latest I18n.
2010-10-26 18:17:11 -02:00
Jeremy Kemper
0dfdbdd4f4
Fix loop introduced by rack:dda892d
2010-10-26 11:31:05 -07:00
José Valim
69a1a0adb5
Remove rack-cache-purge.
2010-10-26 14:05:06 -02:00
Andrew White
4ba24ba043
Allow generated url helpers to be overriden [ #5243 state:resolved]
2010-10-26 14:27:18 +01:00
Andrew White
2d5a12a50b
Don't write out secure cookies unless the request is secure
2010-10-25 16:36:35 +01:00
Santiago Pastorino
d3d724bb88
Remove this require since active_support/testing/default doesn't exist anymore
2010-10-20 12:50:31 -02:00
Xavier Noria
d619b9d1d1
Merge branch 'master' of git://github.com/lifo/docrails
2010-10-19 23:07:29 +02:00
Xavier Noria
95d87823d4
rewords a little the RDoc of the tag helper
2010-10-19 22:59:03 +02:00
Xavier Noria
de3603c255
adds the new :data idiom in tag helpers to the CHANGELOG
2010-10-19 10:13:26 +02:00
Stephen Celis & Xavier Noria
cfcef34bb5
Additional documentation for data-* attributes.
...
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-10-19 10:12:27 +02:00
Aaron Patterson
541ed2b60d
avoid a few comparisons
2010-10-18 16:11:27 -07:00
Krekoten' Marjan
a75d21df06
Fix status initialization when custom status provided
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-18 17:34:22 -02:00
Krekoten' Marjan
608bf7b72c
AC::Caching DRYup
...
Remove ActionController::Caching::Pages#caching_allowed
because it duplicates ActionController::Caching#caching_allowed?
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-18 17:30:28 -02:00
Aaron Patterson
19c144f1b3
remove strange else block
2010-10-18 10:31:21 -07:00
Aaron Patterson
ca59ec354e
skip extra work if no text or phrase was provided
2010-10-18 10:28:56 -07:00
Aaron Patterson
dda81cb177
lets not invert the hash on every iteration through this loop
2010-10-18 10:21:15 -07:00
Aaron Patterson
132f3e2d37
use -= in place of the expanded form
2010-10-18 10:11:32 -07:00
Aaron Patterson
a0a5a2a275
implicitly return nil if there is no number
2010-10-18 10:01:26 -07:00
Aaron Patterson
98d3c41cfb
implicit return of nil
2010-10-18 09:58:18 -07:00
Aaron Patterson
9c219bf361
use regex escape sequences to shorten stuff up
2010-10-18 09:57:24 -07:00
Aaron Patterson
081e15f104
join strings rather than resizing buffer
2010-10-18 09:53:01 -07:00
Santiago Pastorino
330327eeec
Call html_escape in ERB::Util module and don't mix it in in the helpers
2010-10-18 13:59:56 -02:00
Santiago Pastorino
901973b4d7
Invoke html_escape on the proper receiver
2010-10-18 12:29:03 -02:00
Santiago Pastorino
460c4efd71
Merge CHANGELOGs from 3-0-stable
2010-10-18 12:24:41 -02:00
Santiago Pastorino
31ac1db596
Tidy up a bit this code
2010-10-18 09:49:04 -02:00
Santiago Pastorino
1a0f72d0e3
Why strip only the extension, this can be done by the user
2010-10-18 09:48:24 -02:00
Santiago Pastorino
dfb3ff6698
This or login doesn't make sense
2010-10-18 09:47:21 -02:00
Santiago Pastorino
dc33cd6208
Use unless instead of if nil?
2010-10-18 09:45:37 -02:00
Santiago Pastorino
5f60735194
Add missing require
2010-10-18 08:39:20 -02:00
Andrew White
f7573175de
Reset assert_template instance variables between requests [ #5832 state:resolved]
2010-10-18 09:57:51 +01:00
Krekoten' Marjan
7b2ec381ca
Change def to attr_reader + alias
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-18 00:54:58 +02:00
Santiago Pastorino
0d5d70f1a3
parse number only if options[:raise] is provided
2010-10-17 20:44:06 -02:00
Santiago Pastorino
ea7db8ebc1
number_to_phone always return safe
2010-10-17 20:42:13 -02:00
Michael Koziarski
2f9e880431
Rejig the html5 data helper code
...
Avoid allocating an array each pass through and support String subclasses like SafeBuffers
2010-10-18 11:18:43 +13:00
Stephen Celis
5e79094fc1
HTML5 data attribute helpers [ #5825 state:resolved].
2010-10-18 11:18:42 +13:00
Neeraj Singh
ea14396c45
replace if ! with unless
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-17 12:26:32 -02:00
Aditya Sanghi
5a36f9f89d
Merge branch 'master' of github.com:lifo/docrails
2010-10-17 02:09:47 +05:30
Aditya Sanghi
40398a1f47
The deleted examples are redundant.
...
They do not reveal anything new that is not already been explained in preceding example.
2010-10-17 02:08:15 +05:30
Santiago Pastorino
6c8ea83385
extract formats_regexp as a method
2010-10-16 14:12:41 -02:00