Displaying 3 results from an estimated 3 matches for "companiescontrol".
2006 Aug 14
1
Rest, routes, path_prefix and default params
...Controller < ActionController::Base
protected
def find_company
@company = Company.find(params[:company_id])
end
end
And in departments_controller.rb
class DepartmentsControler < ActionController::Base
before_filter :find_company
end
In companies_controller.rb
I have
class CompaniesController < ActionController::Base
protected
def find_company
@company = Company.find(params[:id])
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060814/5db732bd/attachment.html
2005 Dec 29
4
How to handle a non existing action in a controller?
Hello, i''m currently building a website in which i have to customise the
url to the data.
An example:
i have a company which is situated in Amsterdam and it''s name is Ruby,
then i would like to have the following URL:
/companies/amsterdam/ruby/
But since there are a lot of cities that have companies i can''t make a
define for all of these.
How to fix?
Thanks in
2011 Jul 11
39
Help filling out a registration (I think it's called multi tenant)
Do you know when you are filling out a registration for a new account, and
you keep pressing next to fill the rest of the information in separate
pages?
I''d like to do that, but I have no idea how.
Basically I have a company model with its information, and a contacts model,
with belongs to my company (also each company has only one contact), and I''d
like for the user to fill in