aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides
Commit message (Collapse)AuthorAgeFilesLines
* Tighten up the AV::Base constructorAaron Patterson2019-01-291-2/+2
| | | | | | | | | | | | | | | The AV::Base constructor was too complicated, and this commit tightens up the parameters it will take. At runtime, AV::Base is most commonly constructed here: https://github.com/rails/rails/blob/94d54fa4ab641a0ddeb173409cb41cc5becc02a9/actionview/lib/action_view/rendering.rb#L72-L74 This provides an AV::Renderer instance, a hash of assignments, and a controller instance. Since this is the common case for construction, we should remove logic from the constructor that handles other cases. This commit introduces special constructors for those other cases. Interestingly, most code paths that construct AV::Base "strangely" are tests.
* Enable `Lint/UselessAssignment` cop to avoid unused variable warnings (#34904)Ryuta Kamizono2019-01-091-3/+3
| | | | | | | | | | | | | | * Enable `Lint/UselessAssignment` cop to avoid unused variable warnings Since we've addressed the warning "assigned but unused variable" frequently. 370537de05092aeea552146b42042833212a1acc 3040446cece8e7a6d9e29219e636e13f180a1e03 5ed618e192e9788094bd92c51255dda1c4fd0eae 76ebafe594fc23abc3764acc7a3758ca473799e5 And also, I've found the unused args in c1b14ad which raises no warnings by the cop, it shows the value of the cop.
* Add OG tags to layout.html.erbtoshimaru2019-01-091-0/+8
|
* Use safe nav operator when calling RailsGuides::Generator.newYosuke Kabuto2018-12-051-2/+2
| | | | Use String for direction of RailsGuides::Generator
* Use direction instead of rtl flag.Alberto Almagro2018-11-221-11/+14
| | | | | | | | | Improve readability by using `direction` as CSS does. More info: https://developer.mozilla.org/en-US/docs/Web/CSS/direction Continues: #34486 [Alberto Almagro + Ufuk Kayserilioglu]
* Merge pull request #34486 from tamarr/masterRafael Mendonça França2018-11-191-2/+8
|\ | | | | | | allow right to left styling of docs
| * allow right to left styling of docs (#3)tamarr2018-11-191-2/+7
|/ | | | * adding rtl css main file and logic to use
* Wrap custom id of a header attribute into \" in rails guidesbogdanvlviv2018-10-051-1/+1
| | | | Related to https://github.com/rails/rails/pull/33953
* Fix rails guides markdown.rb and renderer.rb to use custom header idwagurano2018-09-232-2/+7
|
* Enable Style/ParenthesesAroundCondition copRyuta Kamizono2018-08-191-2/+2
| | | | To prevent style check in review like https://github.com/rails/rails/pull/33608#discussion_r211087605.
* Enable Start/EndWith and RegexpMatch copsBart de Water2018-07-283-5/+5
| | | | | In cases where the MatchData object is not used, this provides a speed-up: https://github.com/JuanitoFatas/fast-ruby/#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end
* Cleanup credits related code as it is removed now in PR #32429Prathamesh Sonpatki2018-04-032-10/+1
|
* Not generate needless files in guidesYoshiyuki Hirano2018-04-021-25/+27
| | | | | | | Not generate needless files: * _license.html.erb, _welcome.html.erb are partial files. * layout.html.erb is the layout file.
* We should call methods with `.method_name` not `::method_name`.utilum2018-02-221-2/+2
| | | | | | Found several instances. Follow up on 63d530c5e68a8cf53603744789f53ccbc7ac1a0e
* Fix typos and add a few suggestionsFatos Morina2017-11-281-1/+1
|
* Enable `Style/RedundantReturn` rubocop rule, and fixed a couple moreRyuta Kamizono2017-11-011-1/+1
| | | | Follow up of #31004.
* Use frozen string literal in guides/Koichi ITO2017-08-137-0/+13
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-027-7/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-017-0/+7
|
* Define path with __dir__bogdanvlviv2017-05-231-1/+1
| | | | | | ".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f
* Old expression caught to many chars resulting in 404. Added minor change to ↵JD Gonzales2017-05-121-1/+1
| | | | resolve
* Merge pull request #28337 from riseshia/patch-1Rafael França2017-05-031-1/+1
|\ | | | | Fix to use correct path with language on guide
| * Fix to use correct path with language on guideShia2017-03-081-1/+1
| |
* | Use target language's document.yaml [ci skip]Shia2017-05-041-1/+1
| | | | | | | | | | | | | | | | | | Let me build guide with "ko" language, Before: - It try to use guides/source/documents.yaml After: - It try to use guides/source/ko/documents.yaml
* | Fix all style guides violationsRafael Mendonça França2017-04-192-10/+10
| | | | | | | | | | Closes #28382 Closes #28651
* | Add anchor links to all headersRuy Diaz2017-04-011-0/+4
|/ | | | To allow easy linking at all levels and not just from index
* refactors and fixes in guides generation [ci skip]Xavier Noria2017-02-123-133/+89
| | | | | | | | | | | | | | | | | | | | | | | | This commit is not precisely atomic, but the changes have evolved, summary: * The ENV-based interface has been moved upwards, the generator has now a conventional initializer. * RAILS_VERSION is now assumed to be a Git tag. A blank RAILS_VERSION means edge guides. * In consequence, the EDGE env variable is gone. * The "local" version is also gone, the current SHA1 is computed for edge guides. * Assumes guides are generated from a repo checkout (time ago users could generate them from gems.) * The WARNINGS flag is gone in consequence, you cannot disable warnings. * The `api_link` Markdown helper is fixed. * Docs about usage have one single place: rake guides:help. * Links in guides have been revised.
* Fix rubocop violationsRafael Mendonça França2017-02-091-11/+11
|
* Automatically link to Ruby files referenced in notes [ci skip]Robin Dupret2017-02-071-1/+19
| | | | | | | | | | To ease reading the "Active Support Core Extensions" guide, let's automatically link references to Ruby files. It's also possible to reference other components' files in the even though it's not used in the guides at the moment. [Petr Skocik & Robin Dupret]
* Automatically inject the current Rails version in API links [ci skip]Robin Dupret2017-02-071-0/+23
| | | | | | | To make sure that the user won't look at a feature that doesn't already exist if they are looking at a previous version of the guides, let's automatically inject the Rails version the guides have been generated against.
* Fix Rubocop violations and fix documentation visibilityRafael Mendonça França2016-12-281-1/+1
| | | | | | Some methods were added to public API in 5b14129d8d4ad302b4e11df6bd5c7891b75f393c and they should be not part of the public API.
* Fix rake guides:generate:kindle errorBian Jiaping2016-12-181-8/+4
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-296-8/+8
|
* Fix HTML escaping in the guidesRafael Mendonça França2016-10-251-1/+1
| | | | render :html escapes the argument if not provided as html safe.
* Fix indentationRafael Mendonça França2016-10-251-1/+1
|
* Generate HTML not plain textRafael Mendonça França2016-10-251-1/+1
|
* Fix plain option in the rails_guides generatorRafael Mendonça França2016-10-251-1/+1
|
* [ci skip] Update Levenshtein code with better attribution.Kasper Timm Hansen2016-09-121-1/+3
| | | | Lacks some proper creds to the homies who went the... distance ;)
* RuboCop is 100% green :tada:Xavier Noria2016-09-021-8/+9
|
* Add three new rubocop rulesRafael Mendonça França2016-08-162-10/+10
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* Fix broken alignments caused by auto-correct commit 411ccbdRyuta Kamizono2016-08-101-1/+2
| | | | Hash syntax auto-correcting breaks alignments. 411ccbdab2608c62aabdb320d52cb02d446bb39c
* applies remaining conventions across the projectXavier Noria2016-08-062-8/+8
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-063-152/+152
|
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-4/+2
|
* modernizes hash syntax in guidesXavier Noria2016-08-064-9/+9
|
* applies new string literal convention in guidesXavier Noria2016-08-066-95/+95
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Correct guide generation command [ci skip]Aditya Kapoor2016-07-021-3/+3
|
* [ci skip] Fix typoAkshay Vishnoi2015-12-221-1/+1
|
* Simplify `RailsGuides::Generator#select_only` a bitViktar Basharymau2015-11-221-1/+1
| | | The main goal is to improve readability, but as a side effect this commit makes the method a bit faster.
* Fix a typoAlex Popov2015-11-191-1/+1
|