Commit Graph

53819 Commits

Author SHA1 Message Date
Kasper Timm Hansen
80abbd3eea Merge pull request #21895 from abhishekjain16/doc_fix
[ci skip] fix typo
2015-10-07 13:55:10 +02:00
Abhishek Jain
fc4fbac073 [ci skip] fix typo 2015-10-07 15:10:33 +05:30
Arthur Nogueira Neves
27c970f000 Merge pull request #20983 from jameskerr/mailer-preview-url
Update the URL when changing mailer preview formats
2015-10-06 16:57:08 -04:00
Aaron Patterson
895c359182 use methods for accessing the cache control headers
Use the methods rack provides so we don't have to worry about the exact
header key.
2015-10-06 13:39:03 -07:00
Aaron Patterson
cddb700cc2 etag header is in Rack, so use it's response methods
Rack implements the Etag header manipulation methods, so we can use
those instead of ours.
2015-10-06 13:39:03 -07:00
James Kerr
279d0ae816 Update the URL when changing mailer preview formats
Added javascript to update the URL on mailer previews with the
currently selected email format. Reloading the page now keeps you on
your selected format rather than going back to the default html version.
2015-10-06 13:32:07 -07:00
Jeremy Daer
71317e6406 Merge pull request #21869 from jeremy/mime-constant-deprecation
Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compat
2015-10-06 11:30:02 -07:00
Jeremy Daer
565094a8b5 Use Mime[:foo] instead of Mime::Type[:FOO] for back compat
Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries
that support multiple Rails versions would've had to feature-detect
whether to use `Mime::Type[:FOO]` or `Mime::FOO`.

`Mime[:foo]` has been around for ages to look up registered MIME types
by symbol / extension, though, so libraries and plugins can safely
switch to that without breaking backward- or forward-compatibility.

Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup
by type or extension, so it's not available as `Mime[:all]`. We use it
internally as a wildcard for `respond_to` negotiation. If you use this
internal constant, continue to reference it with `Mime::ALL`.

Ref. efc6dd550ee49e7e443f9d72785caa0f240def53
2015-10-06 11:29:30 -07:00
Kasper Timm Hansen
5b69e30622 Merge pull request #21887 from abhishekjain16/doc_fix
Fix usage of word alternatively in docs [ci skip]
2015-10-06 20:21:00 +02:00
Yves Senn
b5e9e1ad3c Merge pull request #21888 from tanmay3011/fix-grammar
[ci skip] Change 'an URL' to 'a URL' as URL doesn't have a vowel sound
2015-10-06 20:18:06 +02:00
tanmay3011
148d1217a1 [ci skip] Change 'an URL' to 'a URL' as URL doesn't have a vowel sound 2015-10-06 23:34:05 +05:30
Abhishek Jain
fe33c15d4d Fix usage of word alternatively in docs [ci skip] 2015-10-06 23:20:27 +05:30
Sean Griffin
9e25e0e173 Implement equality comparison on AttributeSet and friends
Any gems or libraries which do work with serialization or YAML will
ultimately need to compare these objects (albeit indirectly) to ensure
correctness. These will likely never get used internally (as they're
slow), but we should still expose them for others.
2015-10-06 08:52:28 -06:00
Andrew White
7a96e629ef Merge pull request #21879 from abhishekjain16/doc_fix
Fix ActionView changelog documentation [ci skip]
2015-10-06 10:05:29 +01:00
Yves Senn
74859f5784 Merge pull request #21881 from b1nary/active_model_doc_fix
use ActiveModel::Naming module instead of Model [ci skip]
2015-10-06 10:51:50 +02:00
Roman Pramberger
e8c2f0bebe use ActiveModel::Naming module instead of Model [ci skip]
Use the documented module instead of ActiveModel::Model.
This makes the example more focused.
2015-10-06 10:46:14 +02:00
Abhishek Jain
fc0bbe110e Fix ActionView changelog documentation [ci skip] 2015-10-06 12:45:19 +05:30
Gaurav Sharma
b0a3a68889 monitor is require for SneakersAdapter
we are using `@monitor = Monitor.new` that inherit from Monitor class, we leave behind this commit https://github.com/rails/rails/commit/cbfc8b36
2015-10-06 10:34:56 +05:30
Arthur Nogueira Neves
31eb88c71d Merge pull request #21877 from amitsuroliya/unused_block_argument
Remove unused block argument
2015-10-05 23:05:15 -04:00
amitkumarsuroliya
ef3319ff20 Remove unused block argument 2015-10-06 08:26:02 +05:30
Sean Griffin
44ae2ef8c4 Merge pull request #21876 from kentendo/master
Update asset_pipeline.md [ci skip]
2015-10-05 18:34:39 -06:00
Aaron Patterson
4ddbd437c6 render should return a string 2015-10-05 17:33:59 -07:00
kentendo
afe672185d Update asset_pipeline.md 2015-10-05 17:29:49 -07:00
Aaron Patterson
69009f4473 move file sending to the response object
Just a slight refactor that delegates file sending to the response
object.  This gives us the advantage that if a webserver (in the future)
provides a response object that knows how to do accelerated file
serving, it can implement this method.
2015-10-05 16:50:50 -07:00
Sean Griffin
7669844145 Merge pull request #21872 from kirs/chore/attributes-cleanup
No need to declare ActiveRecord::Attributes::Type
2015-10-05 13:46:35 -06:00
Kir Shatrov
40d2b55212 No need to declare ActiveRecord::Attributes::Type 2015-10-05 20:39:56 +03:00
akihiro17
f798cbd2f3 Don't cache arguments in #find_by if they are an ActiveRecord::Relation
In this commit, find_by doesn't cache arguments
so that find_by with association subquery works correctly.

Fixes #20817
2015-10-06 02:36:46 +09:00
Eileen M. Uchitelle
db448209bd Merge pull request #21796 from dv/docs-change-to-parse-nested-query
Change "parse_query" to "parse_nested_query"
2015-10-05 12:56:41 -04:00
David Verhasselt
b4f4de0500 Remove TIP on parse_query
[ci skip]
2015-10-05 19:55:00 +03:00
Xavier Noria
397ee98f54 Merge pull request #20098 from hanachin/add_ability_to_translate_documents.yaml
Add ability to translate rails guides documents.yaml
2015-10-05 18:14:58 +02:00
Seiei Miyagi
d3959c55e3 concatenate @lang if @lang is presence to avoid useless slash 2015-10-05 23:53:05 +09:00
Seiei Miyagi
b2e490ef54 Add ability to translate rails guides documents.yaml
Some translations of rails guides has their own documents.yaml, for example

Japanese:
https://github.com/yasslab/railsguides.jp/blob/japanese/guides/source/documents.yaml

Traditional Chinese:
https://github.com/docrails-tw/guides/blob/master/rails_guides/helpers.rb#L21,L27
https://github.com/docrails-tw/guides/blob/master/source/documents_zh-TW.yaml

The [Translating Rails Guides](https://github.com/rails/docrails/wiki/translating-rails-guides) says

> Copy the contents of guides/source into your own language directory and translate them.

So that sounds ok to copy guides/source/documents.yaml into language
specific directly and translating them like other markdown files.
2015-10-05 23:53:04 +09:00
Bogdan Gusiev
85a1c02508 Make #increment! and #decrement! methods concurency safe 2015-10-05 15:13:04 +03:00
Yves Senn
c468d7fedd Merge pull request #21854 from morgoth/fix-serializing-at-option-in-aj-matchers
Fixed serializing `:at` option for `assert_eqnueued_with` and `assert_performed_with`
2015-10-05 09:04:13 +02:00
Arthur Nogueira Neves
f854be5e64 Merge pull request #21033 from dgynn/preloader_build_scope_tuning
Skip _select! call unless needed for preloader
2015-10-04 21:07:51 -04:00
Sean Griffin
dcdf231b38 Merge pull request #20981 from dkoprov/ar_postgres_enum_docs_addition
Add more info on working with postgres ENUM type
2015-10-04 18:58:04 -06:00
Arthur Nogueira Neves
280c09a210 Merge pull request #20986 from radar/rails-engine-caller-locations
Remove check for caller_locations in Rails::Engine
2015-10-04 20:46:54 -04:00
Arthur Nogueira Neves
e202d59816 Merge pull request #21005 from jaredbeck/patch-1
Docs: Update options for add_reference
2015-10-04 20:44:02 -04:00
Arthur Nogueira Neves
d2ef471b84 Merge pull request #20116 from cristianbica/activejob-enqueue-logging
ActiveJob - log enqueued message only after the job was successfully enqueued
2015-10-04 20:38:44 -04:00
Sean Griffin
411ed20865 Merge pull request #21865 from Gaurav2728/test_cases_protected_method_nodoc
action mailer test cases protected method can be `# :nodoc:` [ci skip]
2015-10-04 17:23:47 -06:00
Sean Griffin
0b51103664 Merge pull request #21867 from akihiro17/fix-relation-doc
[ci skip] Fix ActiveRecord::Relation#update documentation
2015-10-04 17:22:09 -06:00
Vijay Dev
5c2f182e2d Merge pull request #21868 from tanmay3011/fix_time_class_documentation
[ci skip] Fix #seconds_since_midnight documentation output it will al…
2015-10-05 00:28:08 +05:30
Tanmay Sinha
73057f2115 [ci skip] Fix #seconds_since_midnight documentation output it will always return floating pointnumber 2015-10-05 00:06:01 +05:30
akihiro17
dc96af159d [ci skip] Fix ActiveRecord::Relation#update documentation
* before

```
people = Person.where(group: 'expert')
people.update(group: 'masters')

Note: Updating a large number of records will run a
UPDATE query for each record, which may cause a performance
issue. So if it is not needed to run callbacks for each update, it is
preferred to use <tt>update_all</tt> for updating all records using
a single query.
```

* after

```
people = Person.where(group: 'expert')
people.update(group: 'masters')
```
Note: Updating a large number of records will run an
UPDATE query for each record, which may cause a performance
issue. So if it is not needed to run callbacks for each update, it is
preferred to use <tt>update_all</tt> for updating all records using
a single query.
2015-10-05 03:01:54 +09:00
Claudio B.
5dfc7a9006 Merge pull request #21857 from cllns/fix-myspace-example-wording
Update text on CSS Injection
2015-10-04 10:14:09 -07:00
Sean Griffin
df9faf53e9 Merge pull request #21866 from tanmay3011/fix_documentation
Fix Time.now format in documentation [ci skip]
2015-10-04 08:02:23 -06:00
Sean Griffin
eee2aa31a6 Merge pull request #21863 from tanmay3011/use_applications_year
Use #current instead of #now to prevent zone issues and use new ruby …
2015-10-04 07:58:45 -06:00
Tanmay Sinha
73aa47e673 Fix Time.now format in documentation 2015-10-04 19:28:05 +05:30
Tanmay Sinha
b15e8dfd74 Use Time#current instead of Time#now to prevent zone issue inorder to use application's time zone 2015-10-04 19:23:55 +05:30
Sean Griffin
0e27ad3525 Merge pull request #21848 from yui-knk/test_suppress_warnings
Suppress warnings of `assigned but unused variable`
2015-10-04 07:39:46 -06:00