I will be working on an information system in a few weeks. I have
finally gotten the User_Engine engine to work but have realized that to
access any part of the engine it’s always accessed at
http://local…/user/user_engine action.
I have two questions:
-Is there any ways I can rename /user/ to something such as /portal/,
etc.
-If I want to create a controller within /user/, how can I do that. Ex.
http://local…/user/dashboard/
Thanks,
Benjamin J. Hecht
I forgot to add: Can model data for models in the user_engine folder be
accessed from controllers outside of the user_engine folder.
On 5/26/06, Benjamin [email protected] wrote:
I will be working on an information system in a few weeks. I have
finally gotten the User_Engine engine to work but have realized that to
access any part of the engine it’s always accessed at
http://local…/user/user_engine action.
I have two questions:
-Is there any ways I can rename /user/ to something such as /portal/,
etc.
Yes - use routes.
-If I want to create a controller within /user/, how can I do that. Ex.
http://local…/user/dashboard/
Probably the simplest way is to create a normal ‘dashboard’ controller
and use routes to make it look like it’s under /user/dashboard.
Anything else is probably going to get a bit complicated, especially
if you’re not intimately familiar with Rails.
On 5/26/06, Benjamin [email protected] wrote:
I forgot to add: Can model data for models in the user_engine folder be
accessed from controllers outside of the user_engine folder.
… yes. All of the code within an engine is available pretty much as
if it was sitting in your /app folder.
-If I want to create a controller within /user/, how can I do that. Ex.
http://local…/user/dashboard/
You can define a User::DashboardController. But then you have to work
with routes in any case, since it would search a dashboard method in the
UserController before the index method in the User::DashboardController.