title: How can I give all users access to a read-only ‘sample’ in Ruby on Rails?
body: <p>I'm working on fairly standard Ruby on Rails app where <code>users</code> have many <code>studies</code>. When a user signs up, I would like them to have a sample <code>study</code> as an example, similar to how Trello gives you a sample board on sign up.</p>
  
  <p>My current approach is to <code>deep_clone</code> <code>Study.first</code> on registration and assign ownership to the current user. This means new users can edit their clone of the sample study and no-one else can see their changes. This works fairly well however it has now become quite complicated to clone studies as my associations are a lot more complex.</p>
  
  <p>To simplify, I would like to change my approach for the sample study. Instead of cloning, I now want to give everyone <em>access</em> to the first study in the database, but read-only. Studies have a few views, e.g. users can change questions, participants, settings, add tags, etc. They should be able to <em>see</em> existing questions, participants, settings, and tags, but not add, remove, or edit them for this sample study.</p>
  
  <p>I believe I need to:</p>
  
  <ul>
  <li>Figure out how to make <code>Study.first</code> show up for everyone in all the right views without it actually being owned by <code>current_user</code></li>
  <li>Make this study read-only for everyone except me</li>
  </ul>
  
  <p>What's a good approach for doing this in Rails?</p>