Skip to content
shaina7837 edited this page Nov 30, 2014 · 13 revisions
  • Create Databases
  • Create a view (let's call it schedules/list) that shows the list of schedules we have in database, and an option to create new.
  • Clicking on create new schedule, should go to a view that shows title of schedule at top with an option to enter time(from), time(to) and title_of_note. Let's call this view schedule/new
  • There should be a bunch of rows having these three fields "from", "to", "title of notes"
  • schedule/new should have 2 buttons, "add row" and "save".
  • Add row will add another such row on view with 3 inputs. All the rows must have same class but incremental IDs. A class can be .row whereas ids of each row will increment as "row1", "row2", "row3" .. "row n"
  • Save shall trigger a controller that will
  • Create new entry in schedule table with title as given in schedules/new
  • Create a bunch of entries depending upon the number of rows user has added into time_slots table with "schedule_id" pointed to the schedule created in previous point.
  • Now go back to schedules/list and make each item of list clickable. Click on these titles of already existing schedules one should go to another view (schedules/show/:id) that shows time slots registered in that particular schedule.

For ex- there are 3 schedules in database

  • Sunday
  • Monday
  • Tuesday This list should be in show_schedules_view. Clicking on Sunday would lead us to schedule/show/1 (1 being sunday's id) and there we shall have all the timeslots registered under that schedule.
Clone this wiki locally