singular

best practice(s) for singular word or plural words?

This is about best practices in general, not specific for a single language, database or whatever We all have to deal with generated output where you can be reporting "one products" or "two product". Doesn't read very well... Some just solve this by using "one product(s)" or "number of products: (1)" and others might have other solution...

Test if a word is singular or plural in Ruby on Rails

Quick question. How can I test a word to see if it is singular or plural? I'd really like: test_singularity('word') # => true test_singularity('words') # => false I bet rails is capable! Thanks. ...

Rails controller method going to plural form

I'm new to rails! Ok, I am trying to set up a user signup form. It is mapped as a singular resource in the routes map.resource :user And trying to create the user through the console works fine. the controller code for user's signup is as follows: def signup @user = User.new#(params[:user]) end def create @user = User.n...

Mixing Plural AND Singular naming

Hi, here's the quick version of the situation: We are developing some C# App and the team decided this Naming convention: We have for example an entity called User which is stored in the DB, we have the old master/slave pages to manage the User catallog. We are using a sort of MVC pattern, so for the master we have this controller call...

Assigning boost::iterator_range to singular range

I'm using Boost.Range to pass around some data and a container class for this data. The data is loaded in a different thread and may in some cases not be ready yet. In this case the container is initialized with the default iterator_range, hence containing singular iterators. I'm doing assignments and copying of the data containers (henc...

Ruby on rails: singular resource and form_for

I want user to work with only one order connected to user's session. So I set singular resource for order routes.rb: resource :order views/orders/new.html.erb: <%= form_for @order do |f| %> ... <% end %> But when I open the new order page I get an error: undefined method `orders_path` I know, that I can set :url => order_pat...