Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the subtopics method #11379

Open
Tracked by #11187
KarishmaVanwari opened this issue Sep 2, 2022 · 1 comment
Open
Tracked by #11187

Make the subtopics method #11379

KarishmaVanwari opened this issue Sep 2, 2022 · 1 comment

Comments

@KarishmaVanwari
Copy link
Contributor

No description provided.

@jywarren
Copy link
Member

jywarren commented Sep 2, 2022

(Jeff editing here, adding the discussion we had before:)

Just commenting here with notes from our call before, suggested pseudocode for making remote calls to open sub-topics:

Tag…..each do |subtopic|

    <script>
      $(#expand-btn-<%= index %>’).click(function(e) {
        $.ajax(/tags/subtopics?subtopic=<%= subtopic %>).done(function(response) {
            $(#contents-UNIQ’).append(response.responseText);
        });
      });
    </script>

end

Controller:

def subtopics
  Tag.find…… params[:subtopic]
  render “tags/subtopic”, layout: false
end

Originally posted by @jywarren in #11332 (comment)

Let's open a new issue for setting this up within the code you created at #11229 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants