pixelforce_cms 0.2 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1059fbcc4c94ad2990d0ccab23f221bb8e43eec7
|
4
|
+
data.tar.gz: ee67b26bbe232478932a23626f7a54f527d6fffc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83fa1ceb47b1e6343c5b874b1aa35179ecb3ea0e8ed80b810507df1b685d3f72bb3b514a1eb2c4259371d4989508719e746fe354e44c0e32da8964e75519eff2
|
7
|
+
data.tar.gz: b955ed1db95b6c841b3a726d76c732c5be80344180c62e9b0fa9a820e6b91e6eb06e1dee7f58ff4c350d42da11d8023d01e89c529c842b5e4abad8c5e50da47c
|
@@ -1,16 +1,16 @@
|
|
1
|
-
class Admin::<%= controller_name.pluralize %>Controller < Admin::BaseController
|
1
|
+
class Admin::<%= controller_name.pluralize.capitalize %>Controller < Admin::BaseController
|
2
2
|
|
3
3
|
def index
|
4
|
-
@<%= controller_name.underscore.pluralize %> = <%= controller_name %>.all
|
4
|
+
@<%= controller_name.underscore.pluralize %> = <%= controller_name.singularize.capitalize %>.all
|
5
5
|
end
|
6
6
|
|
7
7
|
def new
|
8
|
-
@<%= controller_name.underscore %> = <%= controller_name %>.new
|
8
|
+
@<%= controller_name.singularize.underscore %> = <%= controller_name.singularize.capitalize %>.new
|
9
9
|
end
|
10
10
|
|
11
11
|
def create
|
12
|
-
@<%= controller_name.underscore %> = <%= controller_name %>.new params[:<%= controller_name.underscore %>]
|
13
|
-
if @<%= controller_name.underscore %>.save
|
12
|
+
@<%= controller_name.singularize.underscore %> = <%= controller_name.singularize.capitalize %>.new params[:<%= controller_name.singularize.underscore %>]
|
13
|
+
if @<%= controller_name.singularize.underscore %>.save
|
14
14
|
redirect_to <%= controller_name.underscore.pluralize %>_path
|
15
15
|
else
|
16
16
|
render action: :new
|
@@ -18,12 +18,12 @@ class Admin::<%= controller_name.pluralize %>Controller < Admin::BaseController
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def edit
|
21
|
-
@<%= controller_name.underscore %> = <%= controller_name %>.find params[:id]
|
21
|
+
@<%= controller_name.singularize.underscore %> = <%= controller_name.singularize.capitalize %>.find params[:id]
|
22
22
|
end
|
23
23
|
|
24
24
|
def update
|
25
|
-
@<%= controller_name.underscore %> = <%= controller_name %>.find params[:id]
|
26
|
-
if @<%= controller_name.underscore %>.update_attributes params[:<%= controller_name.underscore %>]
|
25
|
+
@<%= controller_name.singularize.underscore %> = <%= controller_name.singularize.capitalize %>.find params[:id]
|
26
|
+
if @<%= controller_name.singularize.underscore %>.update_attributes params[:<%= controller_name.underscore %>]
|
27
27
|
redirect_to <%= controller_name.underscore.pluralize %>_path
|
28
28
|
else
|
29
29
|
render action: :edit
|
@@ -31,9 +31,9 @@ class Admin::<%= controller_name.pluralize %>Controller < Admin::BaseController
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def destroy
|
34
|
-
@<%= controller_name.underscore %> = <%= controller_name %>.find params[:id]
|
35
|
-
@<%= controller_name.underscore %>.destroy
|
36
|
-
redirect_to <%= controller_name.underscore.pluralize %>_path
|
34
|
+
@<%= controller_name.singularize.underscore %> = <%= controller_name.singularize.capitalize %>.find params[:id]
|
35
|
+
@<%= controller_name.singularize.underscore %>.destroy
|
36
|
+
redirect_to <%= controller_name.pluralize.underscore.pluralize %>_path
|
37
37
|
end
|
38
38
|
|
39
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixelforce_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Zhang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|