Guest User

Untitled

a guest
Mar 17th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. The **Link Entity** has 7 attributes. `id`, `title`, `url`, `slug`, `user_id`, `created_at` and `updated_at`. However some of these attributes rely on gems and other Entities therefore we only need to establish the independent attributes for the time being. Which are `id`, `title`, `url`, `created_at` and `updated_at`.
  2.  
  3. <pre><code>
  4. $ <b>rails generate scaffold link title:string url:string</b>
  5.  
  6. $ <b>rake db:migrate</b>
  7. == 20180308052501 CreateLinks: migrating ======================================
  8. -- create_table(:links)
  9. -> 0.0010s
  10. == 20180308052501 CreateLinks: migrated (0.0011s) =============================
  11. </pre></code>
Add Comment
Please, Sign In to add comment