Sha256: f179d757f4c61d78513f206949af69976a7071f641549c000971a178b4b03095

Contents?: true

Size: 901 Bytes

Versions: 28

Compression:

Stored size: 901 Bytes

Contents

<h1>Devise</h1>

<h4>Using a simple Enum based Role for permissions</h4>

<ul>
  <li>Anyone can view posts</li>
  <li>Only signed in users can create, update or delete a post</li>
  <li>If role <b>user</b>, you can update and delete your own posts only</li>
  <li>If role <b>moderator</b>, you can update any post, but only delete your own posts</li>
  <li>If role <b>admin</b>, you can update or delete any post</li>
</ul>

<h3>Sample users and passwords</h3>

<style>
  table {
    border-collapse: collapse;
  }
  th, td {
    border: 1px solid #ccc;
    padding: 5px;
  }
</style>

<table style='width: 600px;'>
  <tr>
    <th>Name</th>
    <th>Email</th>
    <th>Role</th>
    <th>Password</th>
  </tr>
  <% User.all.each do |user| %>
    <tr>
      <td><%= user.name %></td>
      <td><%= user.email %></td>
      <td><%= user.role %></td>
      <td>password</td>
    </tr>
  <% end %>
</table>

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.3.5 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.3.4 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.3.3 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.3.2 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.3.1 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.3.0 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.43 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.42 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.41 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.40 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.39 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.38 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.37 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.36 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.35 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.34 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.33 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.32 after_templates/addons/devise/app/views/home/index.html.erb
rails_app_generator-0.2.31 after_templates/addons/devise/app/views/home/index.html.erb