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

  • SEARCH
  • Home
  • 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 7746287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:14:28+00:00 2026-06-01T10:14:28+00:00

I know I’m a newbie in Rails but this is the second day I’m

  • 0

I know I’m a newbie in Rails but this is the second day I’m going to waste because of this. Could anybody help me to figure out what I am doing wrong?

I want my user to register from the home page. Click on “Register” button and a fancybox appears with two tabs inside the box, because they can choose between two different forms of registration. Everything is set right, because the fancybox appears but there an error message inside.

In the home page:

<ul class='nav pull-right'>
   <%= render 'devise/menu/registration_items' %>
</ul>

In registration_items:

<% if society_signed_in? %>
  <li>
    <%= link_to('Edit registration', edit_society_registration_path) %>
  </li>
<% else %>
  <li>
    <%= link_to('Register', regist_setup_path)  %>
  </li>
<% end %>

Then in setup:

<div class="fancybox">
  <h2>Sign up</h2>

  <ul class="nav nav-tabs">
    <li class="active"><a data-toggle="tab" href="#society">Society</a></li>
    <li><a data-toggle="tab" href="#collaborator">Collaborator</a></li>
  </ul>

  <div class="tab-content">
    <div class="tab-pane active" id="society">  
      <%= render :partial => 'societies/form' %>  
    </div>
    <div class="tab-pane" id="collaborator">Collaborator
      <%= render :partial => 'collaborators/form' %>
    </div>
  </div>
</div>

The two render :partial just show the forms correctly.
Then Jquery in the application.js after all the //= require blablabla.js

$(document).ready(function() {
  $(".fancybox").fancybox();
});

I tried to set @society = Society.new and @collaborator = Collaborator.new in my application controller but it still doesn’t work

EDIT:
What happen is me clicking on the register button, the setup page appears and when I click on each tab, the box appears with:
The requested content cannot be loaded.
Please try again later. error message

  • 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-01T10:14:29+00:00Added an answer on June 1, 2026 at 10:14 am

    I don’t think this is rails related — Fancybox, and other javascript plugins like this, attach to a link element, so that when they are clicked, it will load up the content based on the href of the link.

    your jquery call should be (in window load)

    $(document).ready(function() {
      $("a.fancybox").fancybox();
    });
    

    So I think you’d want this:

    <%= link_to('Register', "#popup-signup", :class=>"fancybox")  %>
    

    Then the content in the popup:

    <div id="#popup-signup">
      <h2>Sign up</h2>
      ..more stuff here
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Know this might be rather basic, but I been trying to figure out how
I know that this has been discussed thousand times but I still cannot figure
I know that this sort of question has been asked here before, but still
i know this is a stupid question but i d'ont know how to do
I know how to do this with jQuery, but I want to learn it
I know that this isn't exactly normalised, but bringing all of the localised data
I know the meaning of this error, but I'm really struggling with it, and
I know the benefits of chaining within PHP but lets say we have this
I know jquery have backwardscompatibility files. But if you link to this specific version:
This could be a duplicate question, but I have no idea what search terms

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.