similar to: [PATCH] Inflector docs minor bug fixes and extra examples

Displaying 20 results from an estimated 50000 matches similar to: "[PATCH] Inflector docs minor bug fixes and extra examples"

2010 Apr 12
0
[patch] improve reliability of Inflector.transliterate
Hello, I''d like to ask for some feedback on a patch I just submitted. The patch improves the reliability of ActiveSupport::Inflector.transliterate, which currently does not handle many characters from Danish, Swedish, Icelandic, Polish and other European languages. This is because the current code relies upon UTF-8 decomposition, but many common characters do not in fact decompose to
2006 Sep 05
1
Inflector::pluralize("Agencies")=="Agency" ?
The result of Inflector::pluralize("Agency") is correctly "Agencies", but pluralize again and it goes back to the singular ? Is this as expected ? Also, I have a need to know if a word is singular or plural, and to convert it to one or the other regardless of it already being so. Anyway, I''ve written these which seem to work. Do they already exist somewhere ? def
2008 Sep 20
2
NameError: uninitialized constant Inflector
I follwed the example here: http://dekstop.de/weblog/2005/12/rails_inflector_in_ruby_scripts/ #!/usr/bin/ruby require ''rubygems'' require ''active_support/inflector'' puts Inflector.singularize(''inflections'') I loaded it into irb and wrote a killer script both of which worked perfectly for weeks. Now when I try and run the script or run
2005 Mar 16
1
Is there an opposite of Inflector.Camelize
Or to put it another way, is there a function f, such that Inflector.f(Inflector.Camelize(x)) = x ? Enquiring minds need to know. Adelle.
2008 Mar 06
1
Was "Inflector" moved in Rails 2.0?
Trying to place the following code in my "environment.rb" file is throwing an "uninitialized constant Inflector (NameError)". Did they move where these types of customized rules were supposed to be declared? ******CODE****** Inflector.inflections do |inflect| inflect.uncountable("media") end -- Posted via http://www.ruby-forum.com/.
2006 Jul 24
0
Inflector stops on the first match
Hi there. I''m checking the Inflector code there and found, for example, on singularize: inflections.singulars.each { |(rule, replacement)| break if result.gsub!(rule, replacement) } This means that when it finds the first match, it breaks and stops processing rules? And what if I need to deal with more that one rule on the same string? For example, working on the middle and the end
2006 Jun 01
0
Segmentation fault in inflector.rb
Hi, I have finally given up and am desperately hoping for some help. I have developed rails using MySQL-5.0.20a-nt. The application run without any problem in developement environment. Now unfortunately in production I have MySQL-4.1.11. Same application I try to run in production (with mysql 4.1.11) it crashes with the following error. I have no clue why it is doing that. I have been
2006 Jul 24
1
Can''t create new ticket on Trac
When I try to submit a ticket using http://dev.rubyonrails.org/newticket, I get the following: Oops... *Trac detected an internal error:* If you think this really should work and you can reproduce it. Then you should consider to report this problem to the Trac team. Go to http://trac.edgewall.com/ and create a new ticket where you describe the problem, how to reproduce it. Don''t forget
2006 Jul 13
0
Error in Trac when submitting patch
I get the following error when trying to submit a patch: Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 314, in dispatch_request dispatcher.dispatch(req) File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 199, in dispatch resp = chosen_handler.process_request(req) File
2006 Apr 26
10
save new model with child model
Hi, I am having a problem saving a new model that has an associated child model. If a new ticket is being created and will have one comment to go with it then I tried this in my action @ticket = Ticket.new(params[:ticket]) @comment = Comment.new(params[:comment]) @ticket.comments << @comment if @ticket.save @notice = "Ticket added. Thanks for
2007 Jun 25
1
has_many with :dependent => :nullify
Hi all, There is something confusing with has_many in the current API : When deleting a record with association.delete, the corresponding association''s foreign key is nullified. However, if has_many has the :dependent option set (to any value), the association''s destroy method is called instead. This is awfully inconsistent with the behavior expected when setting :dependent to
2006 Nov 04
2
Trac Triage with THE MAGGOT (Time To Clean Your Patches)
Evening, Alright folks, as Jeremy Kemper mentioned I''m working on a set of "triage" scripts for the Rails trac using RFuzz to go through all the tickets and clean them out. I''ve talked this over with the core guys, and they''re behind it. I''m calling this set of scripts "THE MAGGOT" thanks to hasmanyjosh. Basically THE MAGGOT (all caps)
2008 Mar 19
2
ActiveRecord bug? ActiveRecord::ConnectionAdapters::Column.type_cast for float columns
Hi all, I just noticed that in ActiveRecord::ConnectionAdapters::Column.type_cast[1] (and type_cast_code[2]) the type casting for float columns simply does value.to_f, whereas all the others have a rescue or call out to a method, the default implementations of which have rescues or enough logic in that I don''t think they''d fail. Imagine the following: create_table :vehicle do
2007 Nov 09
0
Trac error
I just tried browsing to: http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_view/helpers/asset_tag_helper.rb and got a Trac internal error. It looks to be this issue: http://trac.edgewall.org/ticket/5123 Could somebody upgrade the SilverCity package, if that is indeed the problem? Cheers, Brad --~--~---------~--~----~------------~-------~--~----~ You received this message
2006 Mar 02
1
Fixture accessors broken for polymorphism, in need of redesign
Ticket 4052 (http://dev.rubyonrails.org/ticket/4052) just came through trac, which introduces the need for a better way to access fixtures. I believe the basic problem is the same as 3935 (http://dev.rubyonrails.org/ticket/3935) in that the accessor method which is constructed by the fixture call can''t infer the class name from the table name. The band-aid in 3935 was to allow you to
2006 Jul 27
1
Rails Trac
Hi Anyone know the state of the Rails trac? It looked like it was working again just, but I tried to post a ticket and got this: Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 314, in dispatch_request dispatcher.dispatch(req) File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 199, in
2006 Jun 05
0
Extra pair of eyes for VersionCamp
I''m just wondering if someone is willing to check out a little tool I''ve been working on last 3 days after work called VersionCamp. It''s basic function is to transfer SVN changeset logs into BaseCamp as messages. It''s also meant to be a frontend for a Basecamp project. Displaying the changesets, milestones and tickets(Ticket adding not done). And also
2006 Jul 13
0
Trac currently not accepting new tickets
I''m trying to post a patch and trac is erroring with... --trac error output -- Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 314, in dispatch_request dispatcher.dispatch(req) File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 199, in dispatch resp =
2005 Dec 08
0
#3136 - Country codes in country_select
http://dev.rubyonrails.org/ticket/3136 Simple patch, but in following with others I figured I''d post a quick email to this list. All this does is adds functionality of country_select to allow people to build country select boxes that use country codes. It doesn''t modify default behaviour, and the test suite has been updated. I''ve seen a few people trying to figure out
2006 Jul 13
3
date_helper megapatch and MultiparameterAssignmentErrors
Hello all, There''s a great patch in trac that fixes a lof of issues with the date helpers. I''m afraid it hasn''t had any attention yet. http://dev.rubyonrails.org/ticket/3811 This fixes all the little date_helper problems, except one: When you choose an invalid date ActiveRecord throws an ActiveRecord::MultiparameterAssignmentErrors. This used to work in 1.0,