Displaying 20 results from an estimated 988 matches for "plurals".
Did you mean:
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
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)
...rns 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 across this issue.
thanks,
Michael.
--
Posted via http://www.ruby-forum.com/.
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
...p_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 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 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/rai...
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
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
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)
...words such as
emoji alligator mannequin boulevard cookie umbrella alcohol nadir etc.)
For old English words, the pluralisation rules for them was set before
modern English evolved into what we know today so those old rules still
apply.
All in all, makes it a lot easier to know how to spell English plurals.
Some think opctopi is the plural of octopuses, when it wouldn't be
because it's Greek and not Latin anyway...
To whit: the belief many have that the English plural of virus is virii,
when in fact if anything it'd be afaik viri - which it isn't.
my 2c.
Pete.
[Authority: Platypu...
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
...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
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
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
2015 Apr 17
2
Plurals in English (was Re: ClamAV reports a trojan)
...gator mannequin boulevard cookie umbrella alcohol nadir etc.)
> For old English words, the pluralisation rules for them was set before
> modern English evolved into what we know today so those old rules still
> apply.
>
> All in all, makes it a lot easier to know how to spell English plurals.
>
> Some think opctopi is the plural of octopuses, when it wouldn't be
> because it's Greek and not Latin anyway...
>
> To whit: the belief many have that the English plural of virus is virii,
> when in fact if anything it'd be afaik viri - which it isn't.
>
&g...