Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8878925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:49:52+00:00 2026-06-14T19:49:52+00:00

I have this controller called activities, which contains methods, such as updateweight, displaycalories, etc.

  • 0

I have this controller called activities, which contains methods, such as updateweight, displaycalories, etc.

<ul>
  <li><%= link_to "Home", "/" %></li>
  <li><%= link_to "Update Weight", "/activities/upweight" %></li>
  <li><%= link_to "Food Ressources", "/activities/food_res" %></li>
  <li><%= link_to "Exercises Technics", "/activities/exercises" %></li>
</ul>

Which route would be able to get to the activities controller and to the method with the name that comes after? I’ve tried ressources :activities, but I’m getting bizarre results.

Thanks for helping

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:49:53+00:00Added an answer on June 14, 2026 at 7:49 pm

    Handling any arbitrary action in a controller is non-RESTful. Much older rails versions handled this like:

    match ':controller(/:action(/:id))(.:format)'
    

    .. and in fact that’s still possible with Rails today. You should be careful not to mix RESTful and arbitrary actions in a single controller since actions like ‘create’ and ‘delete’ should not respond to GET requests.

    Alternatively you could promote ‘weight’, ‘foods’ and ‘exercises’ to their own resources.

    Also, you apparently can’t spell ‘resources’ or ‘techniques’ though I rather like the image of exercising one’s technics.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this controller called Cars, and it has: namespace MySite.Controllers { public
I am currently working in a controller called Content. In this controller, I have
I have a controller called NewsController, the constructor of this controller receives an INewsService
I'm using codeigniter I have this BuildTemplate function in my [HOME] controller that authenticates
This issue is very likely codeigniter specific. I have a controller called redirect.php that
I have this controller code: def update super respond_to do |format| format.html{redirect_to session[:redirect_to]} end
I have a Controller called Register that looks like this: class Register extends CI_Controller
I have a controller which calls a method in the controller called GetTypes() [OutputCache(Duration
I have this controller: public class StandingsController : Controller { public ViewResult Index(int id)
I have this controller in Code Igniter application. A value is initialized in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.