aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/engine.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-5/+5
|
* [ci skip] Fixed commas according to Oxford comma in rdoc and guidesAndrey Molchanov2016-09-171-1/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-3/+3
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* code gardening: removes redundant selfsXavier Noria2016-08-081-1/+1
| | | | | | | | | A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-42/+42
|
* applies new string literal convention in railties/libXavier Noria2016-08-061-6/+6
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix some typos in comments.Joe Rafaniello2016-05-041-1/+1
| | | | [ci skip]
* Merge pull request #20986 from radar/rails-engine-caller-locationsArthur Nogueira Neves2015-10-041-6/+1
|\ | | | | Remove check for caller_locations in Rails::Engine
| * Remove check for caller_locations in Rails::EngineRyan Bigg2015-07-231-6/+1
| | | | | | | | This is no longer necessary, as the minimum version requirement for Ruby is 2.2.2, and the `caller_locations` feature was added in Ruby 2.0.0. Since Rails no longer supports pre 2.0 versions of Ruby, there is no need to check first if the Kernel does respond to `caller_locations`. The answer is: yes it does.
* | only construct one request in an engineAaron Patterson2015-09-301-5/+10
| |
* | call `default_middleware_stack` before merging stacksAaron Patterson2015-09-291-1/+2
| | | | | | | | | | | | | | `default_middleware_stack` seems to kick off the `on_load` calls that may mutate the middleware stack. We have to call that method before merging middleware stacks, otherwise the middleware stacks get mutated *after* the app middleware stack is built.
* | Engines get different middleware than appsAaron Patterson2015-09-291-1/+7
| | | | | | | | | | We shouldn't merge the app middleware in to the config middleware for engines.
* | Make app building threadsafeeileencodes2015-09-291-4/+8
| |
* | Stop modifying global variableseileencodes2015-09-291-1/+1
| | | | | | | | | | | | Allocating a new middleware proxy in each application configuration and then merging the app specific config with the global config when the app is built.
* | Merge pull request #21124 from kirs/feature/reload-i18nKasper Timm Hansen2015-08-101-1/+1
|\ \ | | | | | | Reload I18n.load_path in development
| * | Reload I18n locales in developmentKir Shatrov2015-08-101-1/+1
| |/
* | routes in the env via the request objectAaron Patterson2015-08-051-3/+2
| |
* | allocate a request object to avoid hash allocationsAaron Patterson2015-08-051-3/+2
|/ | | | | This decouples the `call` method from knowing the SCRIPT_NAME key and offloads decisions about how to access script_name
* [ci skip] Remove comments about Rails 3.1claudiob2015-05-111-9/+7
| | | | | | | | | Stems from https://github.com/rails/rails/pull/20105#issuecomment-100900939 where @senny said: > From my point of view, all the docs (guides, API) are version bound. > They should describe that version and continue to be available when newer versions are released. > The cross referencing can be done by the interested user.
* Merge pull request #19756 from georgemillo/docsRobin Dupret2015-05-051-17/+26
|\ | | | | fixing English in Rails::Engine docs
| * fixing English in Rails::Engine docsGeorge Millo2015-04-231-17/+26
| | | | | | | | [ci skip]
* | Added missing fullstop in engine API docs [ci skip]Prathamesh Sonpatki2015-05-021-2/+2
|/
* pass a config to the route setAaron Patterson2015-03-051-1/+1
| | | | | This way we can get the relative_url_root from the application without setting another global value
* ask the routes objects for its Rack env keyAaron Patterson2015-03-021-1/+1
| | | | | | this centralizes the logic for determining the script name key and drops object allocations when calling `engine_script_name` (which is called on each `url_for`).
* Fix some typos in railties/lib/rails/engine.rb [ci-skip]RobertZK2015-02-101-4/+4
|
* Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846robertomiranda2015-01-311-1/+1
| | | | ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
* Remove config.assetsJoshua Peek2015-01-211-6/+0
| | | | Provided by sprockets-rails plugin
* - Changed `paths` to `routing_paths` to avoid warning `possible reference to ↵Vipul A M2014-12-261-3/+3
| | | | past scope`
* FIX: absolute_path may be nil for code added via instance_evalSam2014-12-011-1/+1
|
* Use absolute_path of caller_locations to infer engine rootAlexander Mankuta2014-11-261-1/+1
| | | | | According to documentation `path` only returns file names. On MRI it's not the case but it's likely a bug in MRI.
* Minor English fixes in docs [ci skip]George Millo2014-11-171-2/+2
|
* add lib to $LOAD_PATH on application inhertence. fixes #17106Aaron Patterson2014-11-041-3/+6
|
* save a hash allocation per request.Aaron Patterson2014-08-081-1/+1
|
* Deprecate `*_path` methods in mailers@schneems and @sgrif2014-07-301-1/+1
| | | | | | | | | | | Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead. Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR. Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead. The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`. Paired @sgrif & @schneems
* Ensure we supply Kernel#y for 1.9 tooMatthew Draper2014-04-041-2/+0
| | | | | | | | In 1.9, it doesn't live in its own file, so we'll have to define it ourselves. Check RUBY_VERSION, instead of rescuing the require, because we want this to break if `psych/y` moves in a future Ruby release.
* Explicitly load Kernel#y when starting a consoleMatthew Draper2014-04-041-0/+1
| | | | | | | | Previously, we relied on the IRB-detection in Psych itself. But that doesn't work when we're running under spring: the application boots (and thus psych is required) before we switch to console mode and load IRB. Fixes #14587.
* pass strings to the underscore methodAaron Patterson2014-02-261-1/+1
|
* rbconfig is not used in these filesArun Agrawal2013-12-261-1/+0
| | | | remove unused requires
* Merge remote-tracking branch 'docrails/master'Xavier Noria2013-11-241-2/+2
|\ | | | | | | | | | | Conflicts: activesupport/lib/active_support/core_ext/hash/deep_merge.rb activesupport/lib/active_support/core_ext/hash/keys.rb
| * Change syntax format for example returned valuesPrem Sichanugrist2013-11-111-2/+2
| | | | | | | | | | | | | | | | | | According to our guideline, we leave 1 space between `#` and `=>`, so we want `# =>` instead of `#=>`. Thanks to @fxn for the suggestion. [ci skip]
* | Instrument each load config initializerPaul Nikitochkin2013-11-161-1/+7
| | | | | | | | | | | | In order to simplify profiling loading of initializers, added instument for tracking load config initializer event from `config/initializers`
* | Allow Pathnames to be added to eager load pathsMike Pack2013-11-111-1/+1
|/
* Use Ruby 2.0 caller_locations instead of caller if availableAkira Matsuda2013-09-101-2/+7
| | | | | | | | | * we no more have to manipulate the each caller strings by ourselves using caller_locations * caller_locations runs slightly faster, and creates less objects than good old caller Benchmark (loading an Engine 1000 times): caller: 262.89 ms caller_locations: 186.068 ms
* Fix typo in file path, should include extension.Semyon Perepelitsa2013-08-231-1/+1
|
* Revert "Merge branch 'master' of github.com:rails/docrails"Vijay Dev2013-08-171-7/+2
| | | | | | | This reverts commit 70d6e16fbad75b89dd1798ed697e7732b8606fa3, reversing changes made to ea4db3bc078fb3093ecdddffdf4f2f4ff3e1e8f9. Seems to be a code merge done by mistake.
* Revert "Removing obsolete html tags in favor of markdown code block"Avner Cohen2013-08-061-44/+44
| | | | This reverts commit 157dc275da0ad38635337b7c1d96de656d91de8e.
* Removing obsolete html tags in favor of markdown code block.Avner Cohen2013-08-061-44/+44
|
* Use Ruby 2.0 caller_locations instead of caller if availableAkira Matsuda2013-07-251-2/+7
| | | | | | | | | * we no more have to manipulate the each caller strings by ourselves using caller_locations * caller_locations runs slightly faster, and creates less objects than good old caller Benchmark (loading an Engine 1000 times): caller: 262.89 ms caller_locations: 186.068 ms
* rails -> Rails [ci skip]Prathamesh Sonpatki2013-05-091-1/+1
|
* Removing the app constant and replacing it with Rails.applicationwangjohn2013-04-301-4/+4
| | | | | syntax. This helps removing the class level abstraction of an application.