Displaying 2 results from an estimated 2 matches for "find_compani".
Did you mean:
find_company
2006 Aug 14
1
Rest, routes, path_prefix and default params
I am trying to use routes with default params to have routes
''/mycompany/departments''
and
''/companies/1/departments''
mean the same thing (both restful routes).
When I set up the files as below, I get an error of
''Couldn''t find Company without an ID''
and my log file shows the following ..
Processing DepartmentsController#index (for
2006 Nov 28
2
Twice the same code, but only once it seems to work
...mpany :
-------------------
class Company < ActiveRecord::Base
validates_presence_of :name, :email, :url
validates_uniqueness_of :email, :url
validates_format_of :email,
:with => %r{.@.},
:message => "not a valid email"
def self.find_companies
find(:all, :order => "name")
end
end
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send em...