I've created a model that I'm overriding the primary key on:
set_primary_key :SONumber
I'm also using to_param
def to_param
self.SONumber
end
My route for this model is as follows:
resources :sales_orders
In the view when linking to show an individual record:
=link_to 'Open', sales_orders_path(so)
It's generating links with periods in them instead of slashes i.e.:
.../sales_orders.1234 instead of .../sales_orders/1234
What am I missing here? Did I do something wrong?
EDIT: From my routes:
sales_order GET /sales_orders/:id(.:format) sales_orders#show
EDIT 2: Reading this link, I can only assume I have a pluralization error, however, if I switch the view to:
=link_to 'Open', sales_order_path(so)
I get no route matches... I'd rather not manually define the route if there's a better way