This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
-
Ruby version
-
System dependencies
-
Configuration
-
Database creation
-
Database initialization
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions
-
... AlphaBlog
intersting for me you can assing article to user using shofle operator when we have artcile =('hh','eee') and user=("mohamed","adem") user.articles << article
<% @articles.each do |article| %> <% end %>title | description | action | Actions | ||
---|---|---|---|---|---|
<%= article.title %> | <%= article.description %> | <%= link_to 'Show', article_path(article) %> | <%= link_to 'edit', edit_article_path(article) %> | <%= button_to 'Delete', article_path(article), method: :delete, onclick: "return confirm('Are you sure you want to delete this article?');" %> |
<%= link_to 'new', new_article_path %>
<%= link_to 'Show', article_path(article) %> <%= link_to 'edit', edit_article_path(article) %> <%= link_to 'Delete', article_path(article), method: :delete, onclick: "return confirm('Are you sure you want to delete this article?');" %>
Title:<%= @article.title %>
Description:<%= @article.description %>
<%= link_to 'edit', edit_article_path(@article) %> <%= button_to 'Delete', article_path(@article), method: :delete, onclick: "return confirm('Are you sure you want to delete this article?');" %> <%= link_to 'Return to articles listing', articles_path %> <div class="row justify-content-md-center " >
<div class="col-8 mt-4" id="hmida">
<div class="card-header font-italic">
<%= @article.title %>
</div>
<div class="card-body shadow p-3 mb-5 bg-white rounded">
<p class="card-text"><%= @article.description %></p>
<a href="#" ><%= link_to 'edit', edit_article_path(@article),class: "btn btn-outline-info" %></a>
<a href="#" ><%= link_to 'Delete', article_path(@article), method: :delete, onclick: "return confirm('Are you sure you want to delete this article?');",class: "btn btn-outline-danger" %>
created <%= time_ago_in_words(@article.created_at)%> ago ,updated <%= time_ago_in_words(@article.updated_at) %> ago