search for: pluralization

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

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
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)
...axis See that? "Taxes" has become "Taxis". 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'...
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
2006 May 12
2
Pluralization of non-noun names
...tem more difficult). I am now convinced that RoR could actually do the redevelopment job with only a slight expansion to our existing development team and at a cost that would not be much more than our usual developer costs. There are however a few problems, the most obvious that I can see is the pluralization thing. I could change the 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...
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 a...
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: http://wrath.rubyonra...
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
Hi everyone, I''m a rails & ruby nuby, and this is my first post to the list. Here''s my environment in case it helps diagnose my problem: Ruby version 1.8.4 (powerpc-darwin8.6.0) RubyGems version 0.8.11 Rails version 1.1.2 Active Record version 1.14.2 Action Pack version 1.12.1 Action Web Service version 1.1.2 Action Mailer version 1.2.1 Active Support version 1.3.1 I did
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 these which seem to work. Do they already exist somewhere ? def
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
Hi, I have a many to many relationship incorporating the following tables: taxes --> taxes_tax_groups --> tax_groups I have a model named tax with the following declaration: has_and_belongs_to_many :tax_groups and I have a model named tax_group with the following declaration: has_and_belongs_to_many :taxes I am attempting to run the following unit test: require
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
2010 Jul 28
1
Problem loading YAML files and using pluralize method in Rails3rc
Hi, I just upgraded my rails app from rails3.0.0beta4 to rails3.0.0rc and I''m having problems loading a yaml file. I have a load_config.rb in the 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
2006 Jan 09
2
Pluralizations
...as software (since ''software'' is the plural too). I appreciate one can simply use something like use_table or whatever (can''t remember the exact command) in the Model file, but I''d much rather change the inflections.rb file and update Rails to use the proper pluralization. I found *an* inflections.rb file in: (not sure if there''s another inflections file somewhere else which I should edit) /usr/lib/ruby/gems/activesupport-1.2.5/lib/active_support/ and I changed the line: inflect.uncountable %w( equipment information rice money species series fish sheep...
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