Capstone process outline


  1. ERD (Entity Relationship Diagrams) using Ideas
  2. Generate resources w/ scaffolds
    a. rails g resource : scaffold...
    b. rake db migrate
    then RCAV Route, Controller, Action, View
  3. generate user accounts with Devise
  4. add gem devise
  5. bundle install
  6. rails g devise:install
  7. add root route in routes.rb i.e. root "photos#index"
  8. generate users table rails g devise user username name .... from copilot on Ideas
  9. look at migration file & make edits (i.e. to default values)
  10. rake db:migrate
  11. Generate photos/events resources with scaffold rails g scaffold event...
  12. check migration file (i.e. t.references and default values for t.integrer :likes_count, default: 0
  13. Check association accessor with correct foreign key column names if applicable
  14. update migration file to point the foreign key to the correct table i.e. t.references :owner, null: false, foreign_key: { to_table: :users }
  15. rake db:migrate
  16. generate other tables (i.e. comments)
  17. check migration file
  18. check models i.e. comment.rb and user.rb
  19. use Association Accessor app to plan out association accessor methods

  20. Associations
    Direct associations: belongs_to & has_many etc. check Ideas copilot

Indirect Associations

  • look at study buddy answer to second degree associations question

Validations
Sample Data

PART 2 – user interface – use ajax here

7 golden actions (autogenerated using resources :movies in routes.rb (create, new, index, show, update, edit, destroy)

View templates
Partials: _form.html.erb _navbar.html.erb

Bootstrap cards
partials i.e. _movie.html.erb
method: .to_partial_path inherited from ApplicationRecordclass



Source link