phccodesnipperpro 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phccodesnipperpro/script/snippets_controller.rb +6 -4
- data/app/controllers/phccodesnipperpro/script/urls_controller.rb +5 -4
- data/app/views/layouts/phccodesnipperpro/components/backend/footer/_footer.html.erb +1 -1
- data/app/views/layouts/phccodesnipperpro/components/backend/navigation/_top_menu.html.erb +1 -1
- data/lib/phccodesnipperpro/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b9c9864adc927dd1c26147a98eae5b3e5fb8abff070c07fd528f7ef21d6a9ba
|
4
|
+
data.tar.gz: c6de6c8cac00d6c9054756003453050250aaa63f62c5c483047467de063f6fde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b1aae531099746c9def7a72fd056ad562b5e83e0179f970ea4e2b7f8c31d68c1d6d46292b912c353b1ff98a0be975df6f9407528699d8f5290046793d4b41de
|
7
|
+
data.tar.gz: 79df1125613f412c3b06bf374e9731cbb8f8e43b79659332773f1d4fd7cb25fe5a94444af74941cca8e4c7ec8b03cb2db011c000a6c6ec3b3b36887509d1de0a
|
@@ -10,7 +10,7 @@ module Phccodesnipperpro
|
|
10
10
|
|
11
11
|
# INDEX
|
12
12
|
def index
|
13
|
-
@script_snippets = Script::Snippet.
|
13
|
+
@script_snippets = Script::Snippet.where(org_id: current_user.org_id)
|
14
14
|
end
|
15
15
|
|
16
16
|
# SHOW
|
@@ -29,8 +29,10 @@ module Phccodesnipperpro
|
|
29
29
|
# CREATE
|
30
30
|
def create
|
31
31
|
@script_snippet = Script::Snippet.new(script_snippet_params)
|
32
|
+
@script_snippet.user_id = current_user.id
|
33
|
+
@script_snippet.org_id = current_user.org_id
|
32
34
|
if @script_snippet.save
|
33
|
-
redirect_to @script_snippet, :flash => { :success => 'Snippet was
|
35
|
+
redirect_to @script_snippet, :flash => { :success => 'Snippet was Successfully Created.' }
|
34
36
|
else
|
35
37
|
render :new
|
36
38
|
end
|
@@ -39,7 +41,7 @@ module Phccodesnipperpro
|
|
39
41
|
# UPDATE
|
40
42
|
def update
|
41
43
|
if @script_snippet.update(script_snippet_params)
|
42
|
-
redirect_to @script_snippet, :flash => { :success => 'Snippet was
|
44
|
+
redirect_to @script_snippet, :flash => { :success => 'Snippet was Successfully Updated.' }
|
43
45
|
else
|
44
46
|
render :edit
|
45
47
|
end
|
@@ -48,7 +50,7 @@ module Phccodesnipperpro
|
|
48
50
|
# DELETE
|
49
51
|
def destroy
|
50
52
|
@script_snippet.destroy
|
51
|
-
redirect_to script_snippets_url, :flash => { :error => 'Snippet was
|
53
|
+
redirect_to script_snippets_url, :flash => { :error => 'Snippet was Successfully Removed.' }
|
52
54
|
end
|
53
55
|
|
54
56
|
private
|
@@ -11,7 +11,7 @@ module Phccodesnipperpro
|
|
11
11
|
# INDEX
|
12
12
|
def index
|
13
13
|
snippet = Script::Snippet.find(params[:snippet_id])
|
14
|
-
@script_urls = snippet.urls.
|
14
|
+
@script_urls = snippet.urls.where(org_id: current_user.org_id)
|
15
15
|
end
|
16
16
|
|
17
17
|
# SHOW
|
@@ -35,8 +35,9 @@ module Phccodesnipperpro
|
|
35
35
|
@script_snippet = Script::Snippet.find(params[:snippet_id])
|
36
36
|
@script_url = @script_snippet.urls.create(script_url_params)
|
37
37
|
@script_url.user_id = current_user.id
|
38
|
+
@script_url.org_id = current_user.org_id
|
38
39
|
if @script_url.save
|
39
|
-
redirect_to script_snippet_urls_path, :flash => { :success => '
|
40
|
+
redirect_to script_snippet_urls_path, :flash => { :success => 'Snippet URL was Successfully Created.' }
|
40
41
|
else
|
41
42
|
render :new
|
42
43
|
end
|
@@ -46,7 +47,7 @@ module Phccodesnipperpro
|
|
46
47
|
def update
|
47
48
|
@script_snippet = Script::Snippet.find(params[:snippet_id])
|
48
49
|
if @script_url.update(script_url_params)
|
49
|
-
redirect_to script_snippet_urls_path, :flash => { :success => '
|
50
|
+
redirect_to script_snippet_urls_path, :flash => { :success => 'Snippet URL was Successfully Updated.' }
|
50
51
|
else
|
51
52
|
render :edit
|
52
53
|
end
|
@@ -57,7 +58,7 @@ module Phccodesnipperpro
|
|
57
58
|
@script_snippet = Script::Snippet.find(params[:snippet_id])
|
58
59
|
@script_url = @script_snippet.urls.find(params[:id])
|
59
60
|
@script_url.destroy
|
60
|
-
redirect_to script_snippet_urls_path, :flash => { :error => '
|
61
|
+
redirect_to script_snippet_urls_path, :flash => { :error => 'Snippet URL was Successfully Removed.' }
|
61
62
|
end
|
62
63
|
|
63
64
|
private
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!-- Topbar - Navigation Header -->
|
2
2
|
<div class="navbar-header">
|
3
3
|
<%= link_to phccodesnipperpro.script_snippets_path, class: "navbar-brand" do %>
|
4
|
-
<strong>PHC</strong>CodeSnipper
|
4
|
+
<strong>PHC</strong>CodeSnipper(Pro)
|
5
5
|
<% end %>
|
6
6
|
<button type="button" class="navbar-toggle" data-click="sidebar-toggled">
|
7
7
|
<span class="icon-bar"></span>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phccodesnipperpro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|