- ERD (Entity Relationship Diagrams) using Ideas
- Generate resources w/ scaffolds
a.
rails g resource : scaffold...b.rake db migratethen RCAV Route, Controller, Action, View - generate user accounts with Devise
- add
gem devise bundle installrails g devise:install- add root route in
routes.rbi.e.root "photos#index" - generate
userstablerails g devise user username name ....from copilot on Ideas - look at migration file & make edits (i.e. to default values)
rake db:migrate-
Generate photos/events resources with scaffold
rails g scaffold event... - check migration file (i.e.
t.referencesand default values fort.integrer :likes_count, default: 0 - Check association accessor with correct foreign key column names if applicable
- update migration file to point the foreign key to the correct table i.e.
t.references :owner, null: false, foreign_key: { to_table: :users } rake db:migrate- generate other tables (i.e. comments)
- check migration file
- check models i.e.
comment.rbanduser.rb use Association Accessor app to plan out association accessor methods
Associations
Direct associations:belongs_to&has_manyetc. 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
Top comments (0)