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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:31:48+00:00 2026-05-21T21:31:48+00:00

Quite new to Ruby on Rails and I am stuck on probably an easy

  • 0

Quite new to Ruby on Rails and I am stuck on probably an easy task. Basically I am working on a colleague’s app and need to add an additional page that shows users how the app works. I have already written the HTML and styles. I just don’t know how to exactly add it to Rails and configure the routes properly. Any help would be appreciated!

  • 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-21T21:31:49+00:00Added an answer on May 21, 2026 at 9:31 pm

    First make sure that your colleague did not already create a controller to handle static pages. Look under app/controllers for controllers titled anything similar to directories_controller or pages_controller, etc. If he/she has, follow the pattern your colleague already set up (you might want to ask him/her for guidance at that point). If there is not static pages controller like that, then follow the advice below.

    You can create a controller named something like PagesController that defines methods that match a route. For instance, your additional page might be called “help”, in which case you can define a controller like so:

    class PagesController < ActionController::Base
      def help
        # put any code here that you need 
        # (although for a static view you probably won't have any)
      end
    end
    

    Then you’ll want to create a new folder under app/views titled pages, and you can add your static page there (app/views/pages) with a .erb extension. Using a .erb will allow your new page to use the default layout.

    Finally, you’ll need to add this controller to routes.rb in (config/routes.rb) to tell rails where to look for the /help page:

    match '/help' => 'pages#help'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First I'm quite new to ruby and rails... I have a little application working
I'm quite new to ruby and ruby on rails and I'm trying to add
This is probably very simple, but I'm quite new to ruby and active record.
I am quite new to ruby on rails, but I find it phantastic. Anyway,
I'm quite new to Ruby on Rails so please bear with me :) I'm
I'm quite new to ruby development, and i'm currently working on a project in
I'm quite new to ruby/rails. I was wondering what is the best way to
I am quite new to Ruby and Ruby on Rails. While following a Ruby
I am new to ruby and rails and i need to create an sms
I am quite new to ruby, I came across the following code in rails,

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.