mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
rails -> Rails [ci skip]
This commit is contained in:
parent
db1582ac34
commit
d8575289a2
8 changed files with 10 additions and 10 deletions
|
@ -159,7 +159,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
# Returns 62. SQLite supports index names up to 64
|
||||
# characters. The rest is used by rails internally to perform
|
||||
# characters. The rest is used by Rails internally to perform
|
||||
# temporary rename operations
|
||||
def allowed_index_name_length
|
||||
index_name_length - 2
|
||||
|
|
|
@ -3,7 +3,7 @@ require "rails"
|
|||
require "active_model/railtie"
|
||||
|
||||
# For now, action_controller must always be present with
|
||||
# rails, so let's make sure that it gets required before
|
||||
# Rails, so let's make sure that it gets required before
|
||||
# here. This is needed for correctly setting up the middleware.
|
||||
# In the future, this might become an optional require.
|
||||
require "action_controller/railtie"
|
||||
|
|
|
@ -30,7 +30,7 @@ Setup
|
|||
-----
|
||||
|
||||
Currently, Rails plugins are built as gems, _gemified plugins_. They can be shared across
|
||||
different rails applications using RubyGems and Bundler if desired.
|
||||
different Rails applications using RubyGems and Bundler if desired.
|
||||
|
||||
### Generate a gemified plugin.
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ There are many other possibilities, like using a `<script>` tag to make a cross-
|
|||
|
||||
Note: We can't distinguish a `<script>` tag's origin—whether it's a tag on your own site or on some other malicious site—so we must block all `<script>` across the board, even if it's actually a safe same-origin script served from your own site. In these cases, explicitly skip CSRF protection on actions that serve JavaScript meant for a `<script>` tag.
|
||||
|
||||
To protect against all other forged requests, we introduce a _required security token_ that our site knows but other sites don't know. We include the security token in requests and verify it on the server. This is a one-liner in your application controller, and is the default for newly created rails applications:
|
||||
To protect against all other forged requests, we introduce a _required security token_ that our site knows but other sites don't know. We include the security token in requests and verify it on the server. This is a one-liner in your application controller, and is the default for newly created Rails applications:
|
||||
|
||||
```ruby
|
||||
protect_from_forgery with: :exception
|
||||
|
|
|
@ -52,7 +52,7 @@ module Rails
|
|||
end
|
||||
end
|
||||
|
||||
# Returns a Pathname object of the current rails project,
|
||||
# Returns a Pathname object of the current Rails project,
|
||||
# otherwise it returns nil if there is no project:
|
||||
#
|
||||
# Rails.root
|
||||
|
@ -77,7 +77,7 @@ module Rails
|
|||
@_env = ActiveSupport::StringInquirer.new(environment)
|
||||
end
|
||||
|
||||
# Returns all rails groups for loading based on:
|
||||
# Returns all Rails groups for loading based on:
|
||||
#
|
||||
# * The Rails environment;
|
||||
# * The environment variable RAILS_GROUPS;
|
||||
|
@ -100,7 +100,7 @@ module Rails
|
|||
end
|
||||
|
||||
# Returns a Pathname object of the public folder of the current
|
||||
# rails project, otherwise it returns nil if there is no project:
|
||||
# Rails project, otherwise it returns nil if there is no project:
|
||||
#
|
||||
# Rails.public_path
|
||||
# # => #<Pathname:/Users/someuser/some/path/project/public>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
default: &default
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
# For details on connection pooling, see rails configuration guide
|
||||
# For details on connection pooling, see Rails configuration guide
|
||||
# http://guides.rubyonrails.org/configuring.html#database-pooling
|
||||
pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ module ApplicationTests
|
|||
teardown_app
|
||||
end
|
||||
|
||||
test "rails app is present" do
|
||||
test "Rails app is present" do
|
||||
assert File.exist?(app_path("config"))
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Note:
|
||||
# It is important to keep this file as light as possible
|
||||
# the goal for tests that require this is to test booting up
|
||||
# rails from an empty state, so anything added here could
|
||||
# Rails from an empty state, so anything added here could
|
||||
# hide potential failures
|
||||
#
|
||||
# It is also good to know what is the bare minimum to get
|
||||
|
|
Loading…
Reference in a new issue