railswiki 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/models/railswiki/invite.rb +1 -1
- data/app/views/layouts/railswiki/application.html.erb +1 -1
- data/app/views/railswiki/histories/index.html.erb +1 -1
- data/app/views/railswiki/histories/show.html.erb +1 -1
- data/app/views/railswiki/pages/history.html.erb +1 -1
- data/app/views/railswiki/pages/index.html.erb +1 -1
- data/app/views/railswiki/pages/show.html.erb +1 -1
- data/app/views/railswiki/users/index.html.erb +1 -1
- data/app/views/railswiki/users/show.html.erb +1 -1
- data/app/views/shared/_menu.html.erb +3 -3
- data/db/migrate/20170420021039_add_lowercase_title_to_page.rb +6 -5
- data/lib/railswiki/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ba3c0c507eb34d5333d70a52ee587e1a98a590e8dbdaef6a09c48f4ee1e199c3
|
4
|
+
data.tar.gz: 79d1bfe9a57da232402b6917f33e9067f36b601c3ae52db889d1edcd21055011
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 640e5e924abafc37337175587cfb06df8c70fd9e67388afc77442e42c985f8c97be7ba282be7ace5e5d2e3d97abf47bb837beffc53ed63aa8663e7d19a18ba3e
|
7
|
+
data.tar.gz: e3e4bc4cb7767e20230f9c4d5e54a712641fe3e7f51d9ec3c686050b208a0dc6e4062a5bd924650a67f72230345f1d5dd861d262366793108a9d44573cbefc44
|
@@ -3,7 +3,7 @@ require "email_validator"
|
|
3
3
|
module Railswiki
|
4
4
|
class Invite < ApplicationRecord
|
5
5
|
belongs_to :inviting_user, class_name: "User"
|
6
|
-
belongs_to :invited_user, class_name: "User"
|
6
|
+
belongs_to :invited_user, class_name: "User", optional: true
|
7
7
|
|
8
8
|
validates :email, presence: true, uniqueness: true, email: true
|
9
9
|
validates :inviting_user, presence: true
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<% if user_can?(:see_page_author) %>
|
24
24
|
<td><%= user_link history.author %></td>
|
25
25
|
<% end %>
|
26
|
-
<td><%= link_to "json", history_path(history, format: :json) %></td>
|
26
|
+
<td><%= link_to "json", history_path(history, format: :json, data: { turbolinks: false }) %></td>
|
27
27
|
<td><%= link_to 'Destroy', history, method: :delete, data: { confirm: 'Are you sure?' } if user_can?(:delete_history) %></td>
|
28
28
|
</tr>
|
29
29
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<h1>
|
4
4
|
<%= link_to @history.page.title, wiki_path(@history.page) %>
|
5
|
-
<small><%= link_to ".json", history_path(@history, format: :json) %></small>
|
5
|
+
<small><%= link_to ".json", history_path(@history, format: :json), data: { turbolinks: false } %></small>
|
6
6
|
as at <%= time_ago @history.created_at %></h1>
|
7
7
|
|
8
8
|
<div class="wiki-content">
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<h1>
|
4
4
|
History of
|
5
5
|
<%= link_to @page.title, wiki_path(@page) %>
|
6
|
-
<small><%= link_to ".json", page_history_path(@page, format: :json) %></small>
|
6
|
+
<small><%= link_to ".json", page_history_path(@page, format: :json), data: { turbolinks: false } %></small>
|
7
7
|
</h1>
|
8
8
|
|
9
9
|
<%= render "shared/histories", histories: @page.histories %>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<% if user_can?(:see_page_author) %>
|
24
24
|
<td class="author">by <%= user_link page.author %></td>
|
25
25
|
<% end %>
|
26
|
-
<td class="json"><%= link_to "json", wiki_path(page, format: :json) %></td>
|
26
|
+
<td class="json"><%= link_to "json", wiki_path(page, format: :json), data: { turbolinks: false } %></td>
|
27
27
|
<% if is_special_page?(page) || user_can?(:special_pages) %>
|
28
28
|
<td><%= link_to 'Edit', edit_page_path(page) if user_can?(:edit_page) %></td>
|
29
29
|
<td><%= link_to 'Destroy', page, method: :delete, data: { confirm: 'Are you sure?' } if user_can?(:delete_page) %></td>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% else %>
|
8
8
|
<%= link_to 'History', page_history_path(@page), class: "history" if user_can?(:history_page) %>
|
9
9
|
<%= link_to 'Edit', edit_page_path(@page), class: "edit" if user_can?(:edit_page) %>
|
10
|
-
<%= link_to ".json", wiki_path(@page, format: :json), class: "json" %>
|
10
|
+
<%= link_to ".json", wiki_path(@page, format: :json), class: "json", data: { turbolinks: false } %>
|
11
11
|
<% end %>
|
12
12
|
</small>
|
13
13
|
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<td><%= user.role %></td>
|
24
24
|
<td><%= link_to 'Show', user %></td>
|
25
25
|
<td><%= link_to 'Edit', edit_user_path(user) if user_can?(:edit_user) %></td>
|
26
|
-
<td><%= link_to "json", user_path(user, format: :json) %></td>
|
26
|
+
<td><%= link_to "json", user_path(user, format: :json), data: { turbolinks: false } %></td>
|
27
27
|
<td><%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } if user_can?(:delete_user) %></td>
|
28
28
|
</tr>
|
29
29
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<nav>
|
1
|
+
<nav class="menu">
|
2
2
|
<%= link_to "New page", new_page_path if user_can?(:create_page) %>
|
3
|
-
<%= link_to "Pages", pages_path if user_can?(:list_pages) %>
|
3
|
+
<%= link_to "Pages", pages_path, class: "pages" if user_can?(:list_pages) %>
|
4
4
|
<%= link_to "Histories", histories_path if user_can?(:list_histories) %>
|
5
5
|
<%= link_to "Users", users_path if user_can?(:list_users) %>
|
6
6
|
<%= link_to "Invites", invites_path if user_can?(:list_invites) %>
|
@@ -10,6 +10,6 @@
|
|
10
10
|
<%= link_to current_user.name, current_user %>
|
11
11
|
<%= link_to "Sign out", logout_path %>
|
12
12
|
<% else %>
|
13
|
-
<%= link_to "Sign in with Google", main_app.login_path %>
|
13
|
+
<%= link_to "Sign in with Google", main_app.login_path, class: "login" %>
|
14
14
|
<% end %>
|
15
15
|
</nav>
|
@@ -1,5 +1,6 @@
|
|
1
|
-
class AddLowercaseTitleToPage < ActiveRecord::Migration[5.0]
|
2
|
-
def change
|
3
|
-
|
4
|
-
|
5
|
-
end
|
1
|
+
class AddLowercaseTitleToPage < ActiveRecord::Migration[5.0]
|
2
|
+
def change
|
3
|
+
# We need to have a default value for new columns even if they are NOT NULL
|
4
|
+
add_column :railswiki_pages, :lowercase_title, :string, null: false, unique: true, default: "should not be set"
|
5
|
+
end
|
6
|
+
end
|
data/lib/railswiki/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railswiki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jevon Wright
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
248
|
version: '0'
|
249
249
|
requirements: []
|
250
250
|
rubyforge_project:
|
251
|
-
rubygems_version: 2.
|
251
|
+
rubygems_version: 2.7.6
|
252
252
|
signing_key:
|
253
253
|
specification_version: 4
|
254
254
|
summary: A wiki engine in Rails 5.
|