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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:51:09+00:00 2026-05-12T13:51:09+00:00

I have a html table which consists of columns for days, and rows for

  • 0

I have a html table which consists of columns for days, and rows for hours of the day.
I intend this to be a UI widget, similar to the commonly seen calendar date picker.

Clicking on a particular cell of the table would select that date and time for creating a new reservation.

I was considering using a url to represent this selection such as,

http://jupiter.local/reservations/new/2009-09-10/1200/1300

or

http://jupiter.local/reservations/new/date/2009-09-10/start-time/1200/end-time/1300

Is this a valid approach?

I have read a little about rest, however I still don’t get it, except for the obvious example used for showing how to edit a blog record. e.g. blog/posts/23/edit

Currently while playing around with the app, I input the details via form fields, however the date-time select widget will make things much easier to use.

The (current) plan is to render out a series of urls for the hours which are available. If a slot is already booked, then no url is rendered. Of course I would validate the input as well.
To begin with I will assume that a single hour slot is all that can be booked.

I see that websites such as airlines tend to render out a series of urls with a unique code. I expect this requires a session to keep track of these unique id’s.

I am looking for some guidance on the approach as I have not designed something like this before and it is primarily intended as a learning experience.

Thanks

  • 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-12T13:51:09+00:00Added an answer on May 12, 2026 at 1:51 pm

    I’d say you are overcomplicating a bit the RESTful routes. A REST URI emphasizes on working with resources. A reservation is a resource. A Date, IMHO, it’s not. It’s mostly a param, and thus, you should be working with something like:

    http://jupiter.local/reservations/new/?date=2009-09-10&start-hour=1200&end-hour=1300
    

    Although, I’d try to send them using a POST method (http://jupiter.local/reservations/new)

    In either way, the controller will work with params[:reservation][:date], params[:reservartion][:start-hour], etc.

    It’s a more simply approach.

    With that, I’m guessing those are attributes mapped to a table. If not, you can easily create “virtual” attributes for the model with the

    attr_accessor :date, :start-hour, :end-hour
    

    sentence.

    If you send this through AJAX (which I guess you’d using from your description), Rails will add an authentication string, and you can also add your session ID (though I think it adds it aswell).

    If you need more ideas, be sure to update your question 🙂

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

Sidebar

Ask A Question

Stats

  • Questions 283k
  • Answers 283k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Hey take a look at this code for uploading at… May 13, 2026 at 4:12 pm
  • Editorial Team
    Editorial Team added an answer I believe there are two ways to solve this problem.… May 13, 2026 at 4:12 pm
  • Editorial Team
    Editorial Team added an answer It may be just a case of the due_at value… May 13, 2026 at 4:12 pm

Related Questions

I've got a Perl script that groks a bunch of log files looking for
We have a simple ColdFusion page that is outputting basic HTML to the browser.
I am implementing a dashboard as a relative Rails newbie (more of an infrastructure
I have a html table which if filled by values of an mysql table.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.