1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

17 commits

Author SHA1 Message Date
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Akira Matsuda
b70fc698e1 Reduce string objects by using \ instead of + or << for concatenating strings
(I personally prefer writing one string in one line no matter how long it is, though)
2017-01-12 17:45:37 +09:00
Akira Matsuda
d1daf4c313 Privatize unneededly protected methods in Railties 2016-12-25 02:11:40 +09:00
Xavier Noria
b326e82dc0 applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
Xavier Noria
80e66cc4d9 normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
Xavier Noria
69ab3eb57e applies new string literal convention in railties/lib
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:15:47 +02:00
Xavier Noria
0caf8ffd7d revises fileutils dependencies in railties
With the exception of what is loaded in active_support/rails,
each file is responsible for its own dependencies. You cannot
rely on runtime order of execution.
2016-04-11 13:16:17 +02:00
Cory Gwin
c640b2c251 Add No Doc
In reference to rails/rail#22403 add a :nodoc:
2015-12-18 20:05:42 -08:00
Rafael Mendonça França
b9fcce3944 Merge pull request #17302 from claudiob/replace-slower-block-call-with-faster-yield
Replace (slower) block.call with (faster) yield
2014-10-18 17:08:24 -03:00
Zachary Scott
7b71d8cfab Revert "Replace (slower) block.call with (faster) yield"
This reverts commit 0ab075e75f.
2014-10-18 13:04:02 -07:00
claudiob
0ab075e75f Replace (slower) block.call with (faster) yield
Performance optimization: `yield` with an implicit `block` is faster than `block.call`.
See http://youtu.be/fGFM_UrSp70?t=10m35s and the following benchmark:

```ruby
require 'benchmark/ips'

def fast
 yield
end

def slow(&block)
 block.call
end

Benchmark.ips do |x|
 x.report('fast') { fast{} }
 x.report('slow') { slow{} }
end

# => fast    154095 i/100ms
# => slow     71454 i/100ms
# =>
# => fast  7511067.8 (±5.0%) i/s -   37445085 in   4.999660s
# => slow  1227576.9 (±6.8%) i/s -    6145044 in   5.028356s
```
2014-10-18 12:59:51 -07:00
Rafael Mendonça França
533c035205 Merge pull request #16212 from aantix/additional_migration_conflict_help_messaging
Additional help messaging to help the user resolve a conflicted migration
2014-07-18 18:22:37 -03:00
Jim Jones
cc1ad787af Modified migration conflict message to remove the string concatenation. 2014-07-18 08:51:36 -07:00
Jim Jones
af3cf61aa7 Added additional help messaging when there's scaffolding being generated and a migration already exists for the resource.
The user is now alerted that they are able to skip the conflicted migration file via the --skip option.
2014-07-17 21:19:07 -07:00
Aaron Patterson
499c6aa684 require actions rather than create_file
thor's create_file seems to have a circular dependency on itself when
used with our constant loading stuff.

fixes #14319
2014-03-13 12:02:32 -07:00
Gert Goet
3858a247bd Add CreateMigration action
This Thor-action isolates the logic whether to (over-)write migration and
what is shown to the user. It's modelled after Thor's CreateFile-action.

This solves the issue that removing a non-existing migration, tried to
remove the template-path (#13588).

Related issues: #12674
2014-01-28 00:01:19 +01:00