Sha256: df7ab19e8d7a307a8a955de791c513360fc4fa5fbb08654daea3b8283571fefb

Contents?: true

Size: 984 Bytes

Versions: 6

Compression:

Stored size: 984 Bytes

Contents

<script>
  LiveRecord.helpers.loadRecords({ modelName: 'Post' });
  LiveRecord.helpers.loadRecords({ modelName: 'User', url: '<%= j users_path %>' });
  LiveRecord.Model.all.Post.subscribe({ where: { is_enabled_eq: true, content_eq: 'somecontent' }});
</script>
<p id="notice"><%= notice %></p>

<h1>Posts</h1>

<table>
  <thead>
    <tr>
      <th>Title</th>
      <th>Content</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @posts.each do |post| %>
      <tr <%= live_record_destroyable(post) %>>
        <td <%= live_record_updatable(post, :title) %>><%= post.title %></td>
        <td <%= live_record_updatable(post, :content) %>><%= post.content %></td>
        <td><%= link_to 'Show', post %></td>
        <td><%= link_to 'Edit', edit_post_path(post) %></td>
        <td><%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Post', new_post_path %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
live_record-0.2.8 spec/internal/app/views/posts/index.html.erb
live_record-0.2.7 spec/internal/app/views/posts/index.html.erb
live_record-0.2.6 spec/internal/app/views/posts/index.html.erb
live_record-0.2.5 spec/internal/app/views/posts/index.html.erb
live_record-0.2.4 spec/internal/app/views/posts/index.html.erb
live_record-0.2.3 spec/internal/app/views/posts/index.html.erb