search for: plural

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

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...
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 wit...
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...
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 plur...
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/ra...
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 (...
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.r...
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 hence scaffold) generator, so if you do "rails g resource things" Rails will fix it for you...
2015 Apr 16
4
ClamAV reports a trojan
...the suspect file there. or better yet: mount drive from suspect machine on trusted machine. These would be general guidelines for forensics. In particular (someone more knowledgeable will correct me if I'm wrong): clamav is a scanner that is designed to detect viruses (virii I should use for plural as it is Latin word) that can attack MS Windows. In general, these viruses can not do anything to Linux system. Therefore, if clamav detects as "infected" one of the files belonging to Linux distribution, it should be considered a "false positive". After all, it analyses/matches...
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 thi...
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 adopted from other languages into English before...
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 writt...
2006 May 20
3
Repost: Pluralization of non-noun names
...seq p_wrkrs p_xaddr Each policy may or may not have a corresponding record in one of these other tables - if it does it could be a one-to-many or a one-to-one relationship. Is there a way to create new nouns in RoR so that I could create the corresponding plurals like: p_2quots p_addrs p_ccs . . etc and the system would work as normal? Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box 3411 Sydney NSW 2001 Australia Mobile: +61:(0)411-185-652 Fax: +61:(0)2...
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 subscribe...
2006 Jan 09
2
Pluralizations
Hi, I''m new to Ruby and Rails, and I''m running Ruby 1.8.4 with Rails 1.0 on Ubuntu 5.10 (breezy). I wanted to have a model Software, with the table 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...
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 English that came into modern English, use 'Old English' > pluralisation: eg, sheep, fish etc. > words adopted from other...