how_to 1.0.3 → 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/README.rdoc +94 -1
- data/lib/how_to/engine.rb +0 -1
- data/lib/how_to/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 487fb08406004fec07ae616735af735a7ddbbef1
|
4
|
+
data.tar.gz: fba61b59ae940e3797fb839332663954314ee49b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 402340133d6ecd612b9120d166e9ca6a8c0c398b08173f2278a770acf0485f0dcfa9fbf537a17e1b04850101a0b226a94557f8bf2aff8095bf4ca0789fceaff0
|
7
|
+
data.tar.gz: 5a8da8beb71f7e99034912626823859f67866c73f1432196f1ec55a716035642f98436fb98a6455a0ac691d30c9529a8cadcff3036a4fd9602e8ff68fb46c833
|
data/README.rdoc
CHANGED
@@ -1,3 +1,96 @@
|
|
1
1
|
= HowTo
|
2
2
|
|
3
|
-
|
3
|
+
Rails engine that makes managing faq/manual easy and simple. Multilingual CMS for managing faq, question/answer, manual etc.
|
4
|
+
|
5
|
+
=begin
|
6
|
+
{Live Demo}[http://how-to-demo.herokuapp.com]
|
7
|
+
|
8
|
+
{Live demo source code}[https://github.com/railscash/how_to_demo]
|
9
|
+
=end
|
10
|
+
|
11
|
+
===Usage
|
12
|
+
======Include the gem in your Gemfile and bundle to install the gem.
|
13
|
+
===== For Rails 5
|
14
|
+
|
15
|
+
gem 'how_to', '~> 2.0.0'
|
16
|
+
|
17
|
+
====== For Rails 3 & 4
|
18
|
+
gem 'how_to', '~> 1.3.1>'
|
19
|
+
|
20
|
+
====You may need to add the following gems if you want to use default layout for how_to. See layout customization section for more details
|
21
|
+
|
22
|
+
gem "jquery-rails"
|
23
|
+
gem 'bootstrap-sass'
|
24
|
+
gem 'sass-rails', '~> 3.2.5'
|
25
|
+
|
26
|
+
|
27
|
+
===== Install the migrations
|
28
|
+
rake how_to:install:migrations
|
29
|
+
|
30
|
+
===== Run db migrations
|
31
|
+
rake db:migrate
|
32
|
+
|
33
|
+
|
34
|
+
===== Mount in your application's route
|
35
|
+
mount HowTo::Engine => "/how_to"
|
36
|
+
|
37
|
+
===== You can also get the configuration file and overrides by running the config generator.
|
38
|
+
rails g how_to:config
|
39
|
+
|
40
|
+
Details are documented in config file, so please read the config file carefully.
|
41
|
+
|
42
|
+
====== rake db:migrate and visit mounted location, e.g.
|
43
|
+
|
44
|
+
localhost:3000/how_to
|
45
|
+
|
46
|
+
You should see the public page. You should also see two links on head section named sections and contents. if you override the authorization methods (described in later section) make sure you have permissions to access those pages.
|
47
|
+
|
48
|
+
===Modules
|
49
|
+
Two models are there.
|
50
|
+
|
51
|
+
==== Section
|
52
|
+
You can have multilevel section. You can consider this as category. Sections are hierarchical, but only leaves are eligible to have contents
|
53
|
+
|
54
|
+
|
55
|
+
==== Content
|
56
|
+
You can create content as question/answer or faq under a specific section. If you love rich text editor for content then see the last section of Readme.
|
57
|
+
|
58
|
+
|
59
|
+
===== Sample helper methods you may need to define them in your application controller
|
60
|
+
|
61
|
+
def authorize_to_manage_how_to! #you can set the method name in config file
|
62
|
+
redirect_to :root, :notice => t('notifications.admin_section_access_error') unless admin?
|
63
|
+
end
|
64
|
+
|
65
|
+
def allowed_to_view_how_to #you can set the method name in config file
|
66
|
+
redirect_to main_app.root_path, :notice => t('notifications.admin_section_access_error') unless current_user
|
67
|
+
end
|
68
|
+
|
69
|
+
def permitted_to_manage_how_to? #you can set the method name in config file
|
70
|
+
admin?
|
71
|
+
end
|
72
|
+
|
73
|
+
|
74
|
+
===== Optionaly you can customise the layout and view page using:
|
75
|
+
======this will generate layout and associated partials under views/layouts/how_to/
|
76
|
+
rails g how_to:layout
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
======this will generate the public page for faq/manual under views/how_to/
|
81
|
+
rails g how_to:view
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
=== If you want to use rich text editor to manage your content HowTo uses Mercury gem for it. Just install mercury gem and configure as per your requirements. Visit https://github.com/jejacks0n/mercury for more details
|
87
|
+
Then set
|
88
|
+
config.rich_text_enabled = true
|
89
|
+
in initializers/how_to_config.rb file
|
90
|
+
|
91
|
+
|
92
|
+
====For any issues feel free to contact with me or use issue tracker. Drop me a line to ahmed2tul@gmail.com
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
This project rocks and uses MIT-LICENSE.
|
data/lib/how_to/engine.rb
CHANGED
data/lib/how_to/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: how_to
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Muntasim Ahmed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,40 +16,40 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 5.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 5.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: globalize
|
28
|
+
name: globalize-r5
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 5.1.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 5.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: awesome_nested_set
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
200
|
version: '0'
|
201
201
|
requirements: []
|
202
202
|
rubyforge_project:
|
203
|
-
rubygems_version: 2.
|
203
|
+
rubygems_version: 2.4.5.1
|
204
204
|
signing_key:
|
205
205
|
specification_version: 4
|
206
206
|
summary: Rails engine that makes managing faq/manual easy and simple.
|