pixelforce_cms 0.2 → 0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f076067b625f24e933e2e6f29b174752e16012c5
4
- data.tar.gz: fb5b9041a788f8f9ea1e9c022de1482e0e8160e9
3
+ metadata.gz: 1059fbcc4c94ad2990d0ccab23f221bb8e43eec7
4
+ data.tar.gz: ee67b26bbe232478932a23626f7a54f527d6fffc
5
5
  SHA512:
6
- metadata.gz: f12bcfa47f3578b03ca6f3e4819385d086511fe2a98e8fb53f02726c3be9afc73837aecc874d2845cf21b70917ae402a3550e8a6ba137368b56ba98a733794c3
7
- data.tar.gz: ec10dea95a774584c38cbee6448695995470a4982f663b09b9642079546ceb032381badf916d1473c75c6b031c17fdf16fccec37621d15135d4b78f9f3de26fa
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
@@ -1,5 +1,6 @@
1
- class PagesController < ApplicationController
2
-
1
+ class Admin::BaseController < ApplicationController
2
+ before_filter :authenticate_user!
3
+
3
4
  def index
4
5
 
5
6
  end
@@ -1,3 +1,3 @@
1
1
  module PixelforceCms
2
- VERSION = "0.2"
2
+ VERSION = "0.3"
3
3
  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.2'
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-17 00:00:00.000000000 Z
11
+ date: 2013-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler