search for: pluralize

Displaying 20 results from an estimated 980 matches for "pluralize".

2005 Aug 08
68
Pluralized Controller Names?
If I do: script/generate controller Photo I get a controller named photo_controller. OTOH, if I do: script/generate scaffold Photo I get a controller named photos_controller. (Note that the controller name is pluralized). I realize that I''m specifying the controller name explicitly in the first case, but it seems odd to me that the scaffold command generates a pluralized modelname in the absence of a specific controller name. It also seems odd that there appears to be an inconsistency here: why pl...
2009 Oct 02
2
Plural version of the model detected, using singularized version. Override with --force-plural.
what is the proper way to make this work? --force-plural doesn''t seem to change the results. this only seems to happen when you choose words that the plural and singular is the same word. script/generate scaffold equipment name:string description:text warning Plural version of the model detected, using singularized version. Override with --force-plural. results in the following
2006 Apr 12
1
pluralization issue? (taxes/taxis)
...s". Since I am not trying to attach a Yellow Cab to my customers'' orders, I don''t want that. A search of the whole Rails app turns up no instances of the string "taxi" anywhere. Therefore I suspect an oddball pluralization. >From the console, "taxi".pluralize returns "taxis", and "tax".pluralize returns "taxes", so they look right. Just to be safe, I redeclared those plurals explicitly in my environment.rb. Still no dice. I am at a loss, so I am throwing it out to y''all in the hopes someone might have stumbled...
2007 Jan 20
2
Conditional pluralize without the number
Hi. Assume you have an array of person names. I want to generate results in my view that look like this: Abby is your friend or Abby, Bob, and Carol are your friends. So I''d like to say: <%= friends.to_sentence %> <%= pluralize(friends.count, "is") %> your <%= pluralize(friends.count, "friend") %> But because pluralize puts in the number, I get: Abby 1 is your 1 friend or Abby, Bob, and Carol 3 are your 3 friends. Is there a way around this? The API only shows the one form for plurali...
2006 May 12
2
Pluralization of non-noun names
People, I have an insurance company client and for the last eleven years I have wanted to completely redevelop their system from scratch. However, the boss has never been interested in hiring a team to develop the new system (partly because of the cost and partly because of some famous and expensive development failures in the industry) and has always insisted on incremental development of the
2006 Jan 19
4
Using RoR pluralization rules
Hello, RoR seems to be aware of plurals like category=>categories etc..I Want to be able to use this in my application to relate some keywords.Is it possible ?or does RoR itself use some ruby library? Thanks Vivek -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/d5660663/attachment.html
2006 Jul 18
2
Scaffold a Plural table w/ No Pluralization in environment
Hi guys, I have a situation here. I have my project set to no pluralization due to legacy tables in environment.rb. Now, I have some new tables which I''m starting to pluralize. When I do a generate a scaffold to this new table: script/generate scaffold my_tables table it seems to work out fine for certain sections like http://mysite.com/railsapp/new (which also inserts properly to my database). But when I go to http://mysite.com/railsapp/list, I get an application...
2006 May 22
3
rails naming convention for model: community
Hello, How does Rails deal with the pluralization of community. I have "community" as my model name. Will Rails automatically look for a table name "communities" or do I have to name the table "communitys"? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2013 May 03
0
Moving plural detection and --force-plural option to models generator
Hi all, I talked to Aaron briefly about this at RailsConf, but I just wanted to bring this up here before I start working on it in case anyone objects. I will be looking into moving the "Plural version of the model detected, using singularized version. Override with --force-plural." warning and the associated flag into the model generators. Currently this is only in the resource (and
2015 Apr 16
4
ClamAV reports a trojan
On Thu, April 16, 2015 10:09 am, Les Mikesell wrote: > On Thu, Apr 16, 2015 at 10:01 AM, James B. Byrne <byrnejb at harte-lyne.ca> wrote: >> This morning I discovered this in my clamav report from one of our imap servers: >> /usr/share/nmap/scripts/irc-unrealircd-backdoor.nse: >> Unix.Trojan.MSShellcode-21 FOUND >> I have looked at this script and it appears to be
2006 Jun 07
2
script/generate scaffold pluralizes class names
...quot; into the controllers, which worked fine but I wanted to have the scaffold code generated so I could see it and tweak it. So I did a "script/generate scaffold foo" and it generated new views and controllers with scaffolding in them, but now the controllers and views are all pluralized: my user controller became users, my tag controller became tags, etc. So looking at my file tree I wound up with two files names tag_controller.rb & tags_controller.rb - inside the first line says "TagsController" not "TagController" like when rails does it. Is this...
2006 Jul 21
4
weird table pluralization problem
When I created a new project and a "equipment" model for an unknown reason to me rails tried to query the table "equipment" and not "equipments", does someone know why it did that ? So I added set_table_name "equipments" in the model class and it now works but I don''t really understand why it is required in the first place... -- Posted via
2015 Apr 17
0
Plurals in English (was Re: ClamAV reports a trojan)
[OT ALERT] On 17/04/15 02:28, Valeri Galtsev wrote: > clamav is a scanner that is designed to detect viruses (virii I should use > for plural as it is Latin word) I believe this 'rule' in English is misunderstood by many and as a general rule of thumb... tl;dr: Words from Old English that came into modern English, use 'Old English' pluralisation: eg, sheep, fish etc. words
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...
2006 May 20
3
Repost: Pluralization of non-noun names
People, I didn''t get an answer to this before so I am trying again: I could change an existing "policy" table to "policies" with no drama but the are a number of related tables ie: p_2quot p_addr p_cc p_cs p_direct p_div p_exss
2006 Apr 16
5
Newbie Problems with pluralization
...1) Error: test_create(TaxGroupTest): ActiveRecord::StatementInvalid: Mysql::Error: #42S02Table ''imbibitive_test.taxes _group'' doesn''t exist: SELECT * FROM taxes_group WHERE (taxes_group.id = 1) LIM IT 1 ...... 1 tests, 0 assertions, 0 failures, 1 errors Should it not pluralize the last work? Or am i missing something here? Thanks! -- Posted via http://www.ruby-forum.com/.
2006 Mar 17
1
edge - scaffolds now pluralized?
Are my eyes going buggy, or did something recently change in Edge Rails so that now scaffolds are generated with pluralized controller/ helper/etc names? I peeked at the code in railties/lib/rails_generator/generators/components/scaffold/ scaffold_generator.rb around line 50, and it looks like there was a change there recently so that it now defaults to pluralized names. So why was this changed? I can''...
2010 Jul 28
1
Problem loading YAML files and using pluralize method in Rails3rc
...he initializers folder which loads a yaml file. The basic loading code is: FACEBOOK_CONFIG = YAML.load_file(File.join(Rails.root, ''config'', ''facebooker.yml''))[RAILS_ENV] This stopped working when I moved to rails3rc. FACEBOOK_CONFIG returns nil. Also, I have a pluralize method in one of my views, which worked right before: <%= pluralize(post.comments.size, ''comment'') %> Now, I''m getting a: uninitialized constant Post::Comment Can anyone help me sort these two problems? -- You received this message because you are subscribed t...
2006 Jan 09
2
Pluralizations
...pport-1.2.5/lib/active_support/ and I changed the line: inflect.uncountable %w( equipment information rice money species series fish sheep) to: inflect.uncountable %w( equipment information rice money species series fish sheep software) and nothing happened (I tried <%= "Software".pluralize %> in a Rails app) so I restarted apache2, and still nothing happened. I restarted my computer (just in case I had to restart something which I didn''t know about), and still comes up as ''software''. So...is there anything I need to do to get Rails to use the update...
2015 Apr 17
2
Plurals in English (was Re: ClamAV reports a trojan)
On Thu, April 16, 2015 8:59 pm, Peter Lawler wrote: > [OT ALERT] > > On 17/04/15 02:28, Valeri Galtsev wrote: > >> clamav is a scanner that is designed to detect viruses (virii I should >> use >> for plural as it is Latin word) > I believe this 'rule' in English is misunderstood by many and as a > general rule of thumb... > tl;dr: > Words from Old