aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix documentation for String#mb_chars.Steve Klabnik2012-11-281-4/+1
| | | | | | | | This documentation has been out of date.
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-11-031-2/+2
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: actionpack/lib/action_controller/metal/mime_responds.rb activerecord/lib/active_record/attribute_methods.rb guides/source/working_with_javascript_in_rails.md
| * | Adding a missing parenthesis in the doc of String#parameterize.Geoffrey Roguelon2012-10-241-2/+2
| | |
* | | Make caller attribute in deprecation methods optionalAlexey Gaziev2012-10-301-1/+1
|/ /
* | String.to_time documentation along examples.Adam Stankiewicz2012-09-241-1/+11
| |
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-09-212-4/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/configurable.rb activesupport/lib/active_support/core_ext/module/deprecation.rb guides/source/action_controller_overview.md guides/source/active_support_core_extensions.md guides/source/ajax_on_rails.textile guides/source/association_basics.textile guides/source/upgrading_ruby_on_rails.md While resolving conflicts, I have chosen to ignore changes done in docrails at some places - these will be most likely 1.9 hash syntax changes.
| * | update AS/core_ext docs [ci skip]Francesco Rodriguez2012-09-122-4/+3
| | |
* | | &#39 dates back to SGML when &#x27 was introduced in HTML 4.0Kalys Osmonov2012-09-091-1/+1
|/ /
* | Merge pull request #3578 from amatsuda/remove_j_alias_for_json_escapeRafael Mendonça França2012-08-211-7/+0
|\ \ | | | | | | Remove j alias for ERB::Util.json_escape
| * | Remove j alias for ERB::Util.json_escapeAkira Matsuda2011-11-091-7/+0
| | |
* | | defines String#indent [closes #7263] [Xavier Noria & Ace Suares]Xavier Noria2012-08-071-0/+43
| | |
* | | html_escape should escape single quotesSantiago Pastorino2012-07-311-3/+3
| | | | | | | | | | | | | | | https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content Closes #7215
* | | Make ActiveSupport::Inflector locale aware and multilingualDavid Celis2012-07-301-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Inflector is currently not very supportive of internationalized websites. If a user wants to singularize and/or pluralize words based on any locale other than English, they must define each case in locale files. Rather than create large locale files with mappings between singular and plural words, why not allow the Inflector to accept a locale? This patch makes ActiveSupport::Inflector locale aware and uses `:en`` unless otherwise specified. Users will still be provided a list of English (:en) inflections, but they may additionally define inflection rules for other locales. Each list is kept separately and permanently. There is no reason to limit users to one list of inflections: ActiveSupport::Inflector.inflections(:es) do |inflect| inflect.plural(/$/, 's') inflect.plural(/([^aeéiou])$/i, '\1es') inflect.plural(/([aeiou]s)$/i, '\1') inflect.plural(/z$/i, 'ces') inflect.plural(/á([sn])$/i, 'a\1es') inflect.plural(/é([sn])$/i, 'e\1es') inflect.plural(/í([sn])$/i, 'i\1es') inflect.plural(/ó([sn])$/i, 'o\1es') inflect.plural(/ú([sn])$/i, 'u\1es') inflect.singular(/s$/, '') inflect.singular(/es$/, '') inflect.irregular('el', 'los') end 'ley'.pluralize(:es) # => "leyes" 'ley'.pluralize(:en) # => "leys" 'avión'.pluralize(:es) # => "aviones" 'avión'.pluralize(:en) # => "avións" A multilingual Inflector should be of use to anybody that is tasked with internationalizing their Rails application. Signed-off-by: David Celis <david@davidcelis.com>
* | | Fix doc example for dasherizeMarc-Andre Lafortune2012-06-151-1/+1
| | |
* | | remove unnecessary requireSergey Nartimov2012-05-282-4/+0
| | | | | | | | | | | | | | | AS::Multibyte are no longer required by access and filters string core extensions.
* | | Update the documentation and add CHANGELOG entryRafael Mendonça França2012-05-261-1/+1
| | |
* | | doesn't modify params in SafeBuffer#%Vasiliy Ermolovich2012-05-181-3/+1
| | |
* | | Revert "Merge pull request #6354 from lest/patch-1"Carlos Galdino + Rafael Mendonça França2012-05-162-0/+4
| | | | | | | | | | | | | | | | | | | | | This reverts commit e8feaff60b9c04d34ad234f7d17b5d2ad9cc7a24, reversing changes made to 9adf28c026070afb78b80027521a4ddddd68d697. Reason: This broke the actionmailer tests
* | | remove unnecessary requireSergey Nartimov2012-05-162-4/+0
| | | | | | | | | | | | | | | - access & filters don't use multibyte ext - transliterate requires only AS::Multibyte but not multibyte ext
* | | fix safe string interpolation with SafeBuffer#%, closes #6352Vasiliy Ermolovich2012-05-161-0/+14
| | |
* | | remove backported string interpolationVasiliy Ermolovich2012-05-151-2/+0
| | |
* | | removing unnecessary 'examples' noise from activesupportFrancesco Rodriguez2012-05-131-1/+1
| | |
* | | removing trailing spacesFrancesco Rodriguez2012-05-111-3/+3
| | |
* | | added docs to String#to_datetimeFrancesco Rodriguez2012-05-111-0/+6
| | |
* | | added docs to String#to_dateFrancesco Rodriguez2012-05-111-0/+6
| | |
* | | added examples to String#exclude?Francesco Rodriguez2012-05-111-1/+6
| | |
* | | remove unnecessary 'examples' noiseFrancesco Rodriguez2012-05-113-9/+0
| | |
* | | fix String#last exampleFrancesco Rodriguez2012-05-111-1/+1
| | |
* | | fix String#last exampleFrancesco Rodriguez2012-05-111-1/+1
| | |
* | | added docs to String#lastFrancesco Rodriguez2012-05-111-0/+10
| | |
* | | improve String#first docsFrancesco Rodriguez2012-05-111-4/+3
| | |
* | | fix typo in String#firstFrancesco Rodriguez2012-05-111-1/+1
| | |
* | | added docs to String#firstFrancesco Rodriguez2012-05-111-0/+11
| | |
* | | added docs to String#fromFrancesco Rodriguez2012-05-111-0/+13
| | |
* | | improve String#to docsFrancesco Rodriguez2012-05-111-2/+2
| | |
* | | added docs to String#toFrancesco Rodriguez2012-05-111-0/+13
| | |
* | | added docs to String#atFrancesco Rodriguez2012-05-111-0/+25
| | |
* | | Tests for regexp separator in String#truncateAlexey Gaziev2012-04-291-1/+4
| | | | | | | | | | | | https://github.com/rails/rails/commit/5a7513593f64e0ff7e4de1ee37bac5eeddfae270
* | | String quotes and trailing spacesAlexey Gaziev2012-04-294-58/+58
| | |
* | | AS core_ext refactoring pt.2Alexey Gaziev2012-04-292-3/+5
| | |
* | | AS core_ext refactoringAlexey Gaziev2012-04-293-23/+44
| |/ |/|
* | Stop SafeBuffer#clone_empty from issuing warningsCarlos Antonio da Silva2012-03-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | Logic in clone_empty method was dealing with old @dirty variable, which has changed by @html_safe in this commit: https://github.com/rails/rails/commit/139963c99a955520db6373343662e55f4d16dcd1 This was issuing a "not initialized variable" warning - related to: https://github.com/rails/rails/pull/5237 The logic applied by this method is already handled by the [] override, so there is no need to reset the variable here.
* | Ensure [] respects the status of the buffer.José Valim2012-02-291-12/+18
| |
* | delete vulnerable AS::SafeBuffer#[]Akira Matsuda2012-02-201-6/+0
| |
* | add AS::SafeBuffer#clone_emptyAkira Matsuda2012-02-201-0/+6
| |
* | revise docs [ci skip]Vijay Dev2012-02-011-1/+1
| |
* | Move escaping regexps to constantsCarlos Antonio da Silva2012-02-011-2/+4
| |
* | Move escape_once logic to ERB::Util, where it belongs toCarlos Antonio da Silva2012-02-011-0/+15
| | | | | | | | | | | | All the logic is based on the HTML_ESCAPE constant available in ERB::Util, so it seems more logic to have the entire method there and just delegate the helper to use it.
* | Change ActiveRecord::Errors to ActiveModel::Errors in guidesCarlos Antonio da Silva2012-01-251-2/+2
| | | | | | | | | | | | | | Use ActiveModel::Errors in inflection example docs as well. Also fixes wrong information and link to locale file related to Errors#full_messages in I18n guide.
* | refactor String#truncate not to use mb_charsSergey Nartimov2012-01-041-6/+5
| |