Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@

# Ignore Byebug command history file.
.byebug_history
.idea/
2 changes: 1 addition & 1 deletion app/views/comments/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<h1>Comments</h1>

<table>
<table class="table">
<thead>
<tr>
<th>Description</th>
Expand Down
2 changes: 1 addition & 1 deletion app/views/comments/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p id="notice"><%= notice %></p>

<p>
<p class="text-info">
<strong>Description:</strong>
<%= @comment.description %>
</p>
Expand Down
16 changes: 9 additions & 7 deletions app/views/images/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<%= form_for(image, :url => comment_images_path(params[:comment_id])) do |f| %>
<% if image.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(image.errors.count, "error") %> prohibited this image from being saved:</h2>
<div id="error_explanation" class="">
<h2 class="text-danger"><%= pluralize(image.errors.count, "error") %> prohibited this image from being saved:</h2>

<ul>
<% image.errors.full_messages.each do |message| %>
<li><%= message %></li>
<li class="text-danger"><%= message %></li>
<% end %>
</ul>
</div>
<% end %>

<div class="field">
<%= f.label :image %>
<%= f.text_area :image %>
</div>
<div class="form-group">
<div class="field">
<%= f.label :image %>
<%= f.text_area :image %>
</div>
</div>

<div class="actions">
<%= f.submit %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/images/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p id="notice"><%= notice %></p>

<h1>Images</h1>
<h1 class="text-info">Images</h1>

<table>
<table class="table">
<thead>
<tr>
<th>Image</th>
Expand Down
2 changes: 1 addition & 1 deletion app/views/images/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1>New Image</h1>
<h1 class="text-info">New Image</h1>

<% if params.has_key?(:comment_id)%>
<%= render 'form', image: @image %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/images/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p id="notice"><%= notice %></p>
<p id="notice" class="text-info"><%= notice %></p>

<p>
<strong>Image:</strong>
Expand Down
14 changes: 8 additions & 6 deletions app/views/pages/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<p id="notice"><%= notice %></p>
<h1>SE2 UNAL</h1>
<h1>Welcome to our gitworkflow practice</h1>
<h1 class="red-text text-center">SE2 UNAL</h1>
<h1 class="text-center">Welcome to our gitworkflow practice</h1>
<h3>During this pracrice you will understand the basics of Git workflows</h3>
<p><%= link_to 'Users', users_path%></p>
<p><%= link_to 'Posts', posts_path%></p>
<p><%= link_to 'Comments', comments_path%></p>
<p><%= link_to 'Images', images_path%></p>


<p class="btn btn-danger btn-lg"><%= link_to 'Users', users_path%></p>
<p class="btn btn-info btn-lg"><%= link_to 'Posts', posts_path%></p>
<p class="btn btn-success btn-lg"><%= link_to 'Comments', comments_path%></p>
<p class="btn btn-warning btn-lg"><%= link_to 'Images', images_path%></p>
8 changes: 5 additions & 3 deletions app/views/posts/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<h1>Posts</h1>

<table>
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
Expand All @@ -14,8 +14,10 @@

<tbody>
<% @posts.each do |post| %>
<tr>
<td><%= post.name %></td>

<tr >

<td><%= post.name %></td>
<td><%= post.description %></td>
<td><%= post.user %></td>
<td><%= link_to 'Show', post %></td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<h1>Users</h1>

<table>
<table class="table">
<thead>
<tr>
<th>Name</th>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p id="notice"><%= notice %></p>

<p>
<p class="text-info">
<strong>Name:</strong>
<%= @user.name %>
</p>
Expand Down
6 changes: 4 additions & 2 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ default: &default
development:
<<: *default
database: gitworkflow_development
username: gitworkflow
password: 123456789

username: gitworkflow
password: 123456789


# The specified database role being used to connect to postgres.
# To create additional roles in postgres see `$ createuser --help`.
Expand Down