tkh_admin_panel 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@ This is a Rails engine with an admin panel layout, assets and basic functionalit
|
|
4
4
|
|
5
5
|
Primarily developed for Ten Thousand Hours but we are happy to share if anybody finds it useful.
|
6
6
|
|
7
|
-
Please note that this gem is still in its
|
7
|
+
Please note that this gem is still in its infancy. I'm just getting started.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -33,11 +33,9 @@ You need an authentication system with the current_user helper method
|
|
33
33
|
|
34
34
|
## Usage
|
35
35
|
|
36
|
-
In your controller
|
36
|
+
In your controller's relevant methods:
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
... for whichever actions you want to use this layout
|
38
|
+
switch_to_admin_layout
|
41
39
|
|
42
40
|
|
43
41
|
## Contributing
|
data/lib/tkh_admin_panel.rb
CHANGED
@@ -1,11 +1,19 @@
|
|
1
1
|
require "tkh_admin_panel/version"
|
2
2
|
require 'bootstrap-sass'
|
3
3
|
require 'simple_form'
|
4
|
+
require 'tkh_admin_panel/tkh_admin_panel_action_controller_extension'
|
4
5
|
|
5
6
|
module TkhAdminPanel
|
6
7
|
class Engine < ::Rails::Engine
|
7
8
|
initializer "TkhAdminPanel precompile hook", :group => :all do |app|
|
8
9
|
app.config.assets.precompile += ['admin.js', 'admin.css']
|
9
10
|
end
|
11
|
+
|
12
|
+
# to extend the application_controller in the host app
|
13
|
+
initializer 'tkh_admin_panel.controller' do |app|
|
14
|
+
ActiveSupport.on_load(:action_controller) do
|
15
|
+
include TkhAdminPanelActionControllerExtension
|
16
|
+
end
|
17
|
+
end
|
10
18
|
end
|
11
19
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tkh_admin_panel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- lib/generators/tkh_admin_panel/install/install_generator.rb
|
86
86
|
- lib/generators/tkh_admin_panel/install/templates/_admin_sidebar.html.erb
|
87
87
|
- lib/tkh_admin_panel.rb
|
88
|
+
- lib/tkh_admin_panel/tkh_admin_panel_action_controller_extension.rb
|
88
89
|
- lib/tkh_admin_panel/version.rb
|
89
90
|
- public/.DS_Store
|
90
91
|
- public/favicon.ico
|