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 8665523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:30:00+00:00 2026-06-12T17:30:00+00:00

These are part of my routes. activity_groups GET /activity_groups(.:format) activity_groups#index POST /activity_groups(.:format) activity_groups#create new_activity_group

  • 0

These are part of my routes.

   activity_groups GET    /activity_groups(.:format)                                activity_groups#index
                           POST   /activity_groups(.:format)                                activity_groups#create
        new_activity_group GET    /activity_groups/new(.:format)                            activity_groups#new
       edit_activity_group GET    /activity_groups/:id/edit(.:format)                       activity_groups#edit
            activity_group GET    /activity_groups/:id(.:format)                            activity_groups#show
                           PUT    /activity_groups/:id(.:format)                            activity_groups#update
                           DELETE /activity_groups/:id(.:format)                            activity_groups#destroy
                      root        /                                                         main#index

Minimal view:

activity_groups/show

%h2 Activity Ggroup

%h3= @activity_group.title

= link_to "Edit", edit_activity_group_path(@activity_group)
|
= link_to "Delete", activity_group_path(@activity_group), {confirm: (I18n.t "confirmations.activity_group.delete"), method: :delete}
|
= link_to "Back", activity_groups_path

The index is a little bit more complex:

activity_groups/index

.row
    .span8
        %h1.padding_bottom1 Activity Groups

        - if !@activity_groups.empty?

            %ul.span6
                %li.span1 F
                %li.span2 Name
                %li.span2 Actions

            = render @activity_groups
            = render @activities
        - else
            %h2.extra_padding You have no Activity Groups yet. Add one and start managing your time. 

    .span6.padding_top1
        =link_to "Create Activity Group", new_activity_group_path, {class: 'btn'}
        =link_to "Create Activity", new_activity_path, {class: 'btn'}

activity_groups/_activity_group.html.haml

%ul.span6
    %li.span1
        %i.icon-folder-close.folder
    %li.span2
        = activity_group.title
    %li.span2
        PROBLEM

    - if !activity_group.activity_groups.empty?
        - activity_group.activity_groups.each do |activity_group|
            = render partial: 'activity_group', locals: {activity_group: activity_group}

    - if !activity_group.activities.empty?
        - activity_group.activities.each do |activity|
            = render partial: 'activities/activity', locals: {activity: activity}

PROBLEM If i place a link_to "Show", activity_groups_path(activity_group) here my routes go crazy. My activity_groups_path is gone. I can’t access it anymore. It tries to redirect me to the show view and not to the index view. I really don’t understand why this happens. Any ideas?

[EDIT1]

I started with a clean database. If I try to place a link for the show page now I get a NameError undefined local variable or methodactivity_group_path’`

[EDIT2] corrected misspell above

  • 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-12T17:30:01+00:00Added an answer on June 12, 2026 at 5:30 pm

    Are you passing object to your link path?

    activity_group_path(@activity_group)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I came across these two methods to concatenate strings: Common part: char* first= First;
Strange problem happening where the end of these 2 blocks of code (this part:
Is there any way to get just a part from MySql cell and ignore
In my config > routes I have: #Service Routes match services => services#index match
I try to follow Akrabats Tutorial the Application/Index is working, the Album part not.
I can't seem to figure out how to get my routes setup properly. In
Reading Java Concurrency In Practice, there's this part in section 3.5: public Holder holder;
Are there any open source projects or part of codes using which its possible
Is there a way to update only Hour part in a DateTime field?? If
Is there any way to adjust the boundaries of the visible part of 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.