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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:25:01+00:00 2026-05-22T17:25:01+00:00

This is my first web app that i am developing and i have some

  • 0

This is my first web app that i am developing and i have some design questions, i have a few book about RoR3 but i dont seem to find answers to my questions.
My application is based on Ruby on rails 3

I am not looking for detailed answers here, if you can just point me to a topic name that i could learn about that can answer my qustions, such as “names resources” , “hidden fields” …..

My questions:
1- How to send information between View A and controller B. Example, i am on the View for “Company” when i click create employee i am calling the “new view” for the employee so i am now on a different view, how can i pass to the new employee action the ID of the company? Since i am now on a different view ? i don’t want to use nested resources
What are the different ways to send information across different controllers/views

2- ruby URLs: i can view am item in my model via the URL: http://localhost:3000/Companies/1
I don’t want the url to contain the index of the item, each company has a name and i want to display this name in the url such as http://localhost:3000/Companies/myCompany
How can i change the url structure of rails?

  • 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-05-22T17:25:01+00:00Added an answer on May 22, 2026 at 5:25 pm

    For your first question, you can pass the parameters with the link (assuming you have employee and company variables accessible to your view):

    Edit: this should work:

    = link_to "create employee", :controller => "employees", :action => "new", :company_id => @company.id 
    

    And in the Employees controller:

    def new
      company_id = params[:company_id]
      # check that company_id is not nil before doing stuff with it
    end
    

    I’m not sure why doing this ignores any extra parameters:

    = link_to "create employee", new_employee_path, :company_id => @company.id
    

    For your second question, this is what you’re looking for.

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

Sidebar

Related Questions

I'm developing a QA web-app which will have some points to evaluated assigned to
I've been developing my first web based app for about two months now (I'm
This is my first time with Web services. I have to develop web services
first of all this is my third question about web services here and i
I am developing a Seam-Jsfv1.2-EJB3 web app. I have a datatable and checkboxes in
I'm developing an ajax heavy web app, and would like to have textarea 's
I am developing a simple web app that uses the Google translation API in
I am co-developing a simple web app in Rails 3.0.9 and I have realized
I'm currently developing a moderately large sized web app with ASP.NET 2.0 that uses
I am designing a web app that has some information that needs to be

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.