| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Rails.logger should have level specified by config.log_level.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | | |
Fix bug when log level of Rails.logger (which was set via config.logger) does not match the config.log_level.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
update guide to reflect default HMAC SHA1 in MessageVerifier used in SignedCookieStore
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
SignedCookieStore [ci skip]
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Minor optimization and code cleanup in query_methods.rb
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
- Use symbols rather than strings where possible to avoid extra object construction
- Use destructive methods where possible to avoid extra object construction
- Use array union rather than concat followed by uniq
- Use shorthand block syntax where possible
- Use consistent multiline block styles, method names, method parenteses style, and spacing
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Added to 'Security' section in 'Getting Started with Rails' guide, including reference to 'Ruby on Rails Security Guide'.
|
| | |_|_|/ / / / /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | | |
Guide'. [ci skip]
|
|\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
Fix active_record_validations.md document, `:save` for `on:` validation helper was never available
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
helper was never available
According to the guide, ":save" value for the "on:" validation helper
was available like below
validates :name, presence: true, on: :save
but this was never available according to the implementation of the
valid? method, which is below
# Runs all the validations within the specified context. Returns
+true+ if
# no errors are found, +false+ otherwise.
#
# If the argument is +false+ (default is +nil+), the context is set
to <tt>:create</tt> if
# <tt>new_record?</tt> is +true+, and to <tt>:update</tt> if it is
not.
#
# Validations with no <tt>:on</tt> option will run no matter the
context. Validations with
# some <tt>:on</tt> option will only run in the specified context.
def valid?(context = nil)
context ||= (new_record? ? :create : :update)
output = super(context)
errors.empty? && output
end
So the documentation was always wrong since the PR proposed by
@neerajdotname ( #10287 ) was rejected.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We need to call `in_time_zone` to test that it isn't modifying the receiver
but since the variable isn't used it raises a warning so add an assertion
to make Ruby think it's being used.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The section was clearly wrong and was just an example about how to use ActiveSupport helpers in Rack/Sinatra
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
[ci skip]
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
[ci skip]
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Add note that you must be in the rails app when starting the server
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
server.
This is a response to issue #11731 and is a common mistake for people
newer to rails that try forget to cd into the new rails app after
running rails new.
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
i18n guide update: corrected reference to activerecord to instead reference activemodel
|
| |/ / / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
is in activemodel, not activerecord
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Removed an unnecessary loop - it kills performance on large texts.
|
| | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
[Fixes #11734]Correct Association Basics Guide on has_and_belongs_to_many
|
| | |/ / / / / / / / /
| |/| | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
skip]
Done the following changes:
1. Replace uniq call in example with autosave as uniq is not supported
on has_and_belongs_to_many
2. Add :readonly option to list of supported call as per
[EdgeApi](http://edgeapi.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_and_belongs_to_many)
|
|\ \ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / / /
|/| | | | | | | | | | |
Changing the def self.table_name to self.table_name in the column_name.r...
|
| | |_|_|_|_|_|/ / /
| |/| | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
used flat_map instead of map.flatten in /guides/rails_guides/helpers.rb
|
| |/ / / / / / / / / |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
javascript_include_tag "extname" option for use by asset_path
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
ActionView::Helpers.asset_path is where the logic for
javascript_include_tag resides. It takes an extname option for
specifying the extension or false to not append it. This exposes that
option to javascript_include_tag.
Without the option files that didn't end with ".js" would get the
extension appended to them. This broke JST templates and other file
types that should be interpreted as JavaScript but who's file extension
isn't ".js"
|
|\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
fix for postgresql failing test in local
|
| | |/ / / / / / / / /
| |/| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / / /
|/| | | | | | | | | | |
use flat_map
|
| | |/ / / / / / / /
| |/| | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
[JRuby] Avoid calling define_method with non-english chars in InflectorTest
|
| |/ / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
When we call define_method with non-english chars like ¿por qué? it
errors out on JRuby as of 1.7.4 & would leave out the following error
invalid byte sequence in US-ASCII
To work around this issue, I have switched to define_test method call
define method with fixed string & the index of the hash. the index was
added because otherwise, ruby will raise method redefined warning.
As far as I can see there are no side-effect of this change for
other implementations. For readbility I have added a message to
asssert_equal informing for which word/phase the test has passed.
Before this Change:
JRuby:
Tests terminated suddenly with an error. no reported of Failues
or errors
MRI:
All Green.
After this Change,
JRuby:
the `ActiveSupport` TestsSuite gracefully fails with report at the end which test failed & why.
MRI:
All Green(no change)
|
|\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
Using URI.parser.unescape
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fixes warning
warning: URI.unescape is obsolete
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This fixes railties tests in JRuby but break it in MRI
This reverts commit fea99276c7024f183bf72a16ad9f36af4bae1d42.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Isolate railties Generators Tests
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | | |
With this change jruby should pass all of the railties tests.
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Add timeout to test_async_stream
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Without timeout:
this test executed infinitely on JRuby
Passes on MRI
With Timeout:
this test gracefully fails on JRuby
Passes on MRI, tested on v2.0 & v1.9.3
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fix jruby warning when capture calls unlink on an open tempfile
|
|/ / / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Jruby cannot unlink a tempfile unless it is closed first.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fix ActiveSupport::Testing::Isolation on jruby
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Hopefully the first of many related to #11700.
With these changes the railties tests wont 100% pass but at least they
will run and show the errors.
The first problem was the @method_name variable was never set.
This was causing ENV["ISOLATION_TEST"] to always be nil which
would cause the test output to never be written to the tempfile.
The second problem was that an invalid -t option was being passed
to minitest and minitest was erroring out.
The third problem was the run method needs to always return an
instance of the test class it is trying to isolate. We were returning
a ProxyTestResult instead.
|
|\ \ \ \ \ \ \ \ \ \
| |_|_|_|_|_|_|/ / /
|/| | | | | | | | | |
As we are doing debug mode on
|