contentment 0.8.3 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.rdoc +21 -27
  2. data/lib/contentment/version.rb +1 -1
  3. metadata +2 -3
@@ -1,34 +1,36 @@
1
1
  =Contentment
2
2
 
3
- ===Contentment is a extremely basic Content Management System for Ruby On Rails.
3
+ ===Contentment is a extremely basic Content Management System for Ruby On Rails.
4
4
 
5
5
  How often do your clients want to manage / edit some piddly little portion of the site you're building for them?
6
6
  Every time? Yeah me too. If what you need is a way for your clients to manage the FAQ or Testimonials, contentment is for you.
7
7
  It's simple to use and will save you time.
8
8
 
9
- The primary advantage it offers over a roll-your-own CMS is consistency.
10
- Use Contentment whenever you need a basic CMS and you can stop re-inventing the wheel and start pumping code.
9
+ The primary advantage it offers over a roll-your-own CMS is consistency.
10
+ Use Contentment whenever you need a basic CMS and you can stop re-inventing the wheel and start pumping code.
11
11
 
12
12
  ==Get Contentment
13
13
  Add it to your gemfile
14
14
  gem 'contentment'
15
- and run
15
+ and run
16
16
  bundle install
17
-
17
+
18
18
  ==Use Contentment
19
19
  rails generate contentment
20
- rails g contentment_views
20
+ rails g contentment_views
21
21
  rake db:migrate
22
22
  This will create the Content model and a migration to add the contents table to your database, if it doesn't already exist.
23
- It will also create contents_controller.rb for you with all the CRUD already done, and create the views to manage your Content.
23
+ It will also create contents_controller.rb for you with all the CRUD already done, and create the views to manage your Content.
24
24
 
25
- Fire up the server and you're ready to go.
25
+ add
26
+ resources :contents
27
+ to your routes.rb file and you're ready to go.
26
28
 
27
29
  ==Details
28
30
  :title and :body are pretty self explanatory, perfect for question and answer, or header and paragraph.
29
31
 
30
32
  :tipe is not type to get around rails polymorphic associations, and exists to help you keep track of what
31
- Content goes on what pages. Add your own values to the @tipes array
33
+ Content goes on what pages. Add your own values to the @tipes array
32
34
  @tipes = [
33
35
  # "Billboard",
34
36
  # "What You Learn",
@@ -49,28 +51,18 @@ been up and running for a while or you might orphan Content.
49
51
  :visible will help you hide things without deleting them.
50
52
 
51
53
  :link will allow you to have your navigation editable by your client. Put what you want to show up in the title,
52
- and where you want to go in the link field and I'm sure you can fill in the rest.
54
+ and where you want to go in the link field and I'm sure you can fill in the rest.
53
55
 
54
56
  ==Live Preview of Content on Edit
55
57
 
56
- If you're using jQuery
57
-
58
- Slap this in your application.js to get live preview of the title attribute of content
59
- $(document).ready(function(){$('.edit_content').keyup(function(){$('.content_preview_title').html($('#content_title').val());});})
60
-
61
-
62
- I'm using TinyMCE Hammer to get TinyMCE in my projects, and if you install it too you can have live preview of the body of your content pretty easily.
63
- (I'm working on getting TinyMCE included in this gem)
58
+ I've added tinymce-rails as a dependency of this project.
64
59
  TinyMCE is nice because your clients probably want the ability to add line breaks and other styling without having to learn HTML.
65
- So. Install the TinyMCE Hammer plugin https://github.com/trevorrowe/tinymce_hammer or http://tinymcehammer.lanalot.com/ , I don't know which is canonical.
66
- Then add
67
- <%= yield :scripts %>
68
- to the <head> section of whatever layout (probably application.html.erb) is rendered around the contents/edit.html.erb file.
69
- Donezo. You should now see the changes made to the title and body of your content on the edit view live and in real time in the preview area.
70
- Clients love that.
60
+
61
+ If you're using jQuery you should be able to see the changes made to the title and body of your content on the edit view live and in real time in the preview area.
62
+ Clients (usually) love that.
71
63
 
72
64
  ==That's It!
73
- If it did anything else it wouldn't be simple anymore.
65
+ If it did anything else it wouldn't be simple anymore.
74
66
 
75
67
  Questions, Thoughts, Comments to larrick@gmail.com
76
68
 
@@ -87,7 +79,9 @@ And also finally thanks to https://github.com/elricstorm/baby_dove which I used
87
79
 
88
80
  Read More about engines - http://edgeapi.rubyonrails.org/classes/Rails/Engine.html
89
81
 
82
+ Write your own gemspec - http://blog.leshill.org/blog/2011/08/21/write-your-own-gemspec.html
83
+
84
+ Rubygems guide to building your own gem - http://guides.rubygems.org/make-your-own-gem/
85
+
90
86
  ==TODO
91
- * Get TinyMCE Integrated so there's no external dependancies.
92
87
  * Get an example app using contentment up somewhere to show it off.
93
-
@@ -1,3 +1,3 @@
1
1
  module Contentment
2
- VERSION = "0.8.3"
2
+ VERSION = "0.8.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
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-09-18 00:00:00.000000000 Z
12
+ date: 2012-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tinymce-rails
@@ -62,7 +62,6 @@ files:
62
62
  - lib/generators/contentment/templates/migration.rb
63
63
  - lib/generators/contentment_generator.rb
64
64
  - lib/generators/contentment_views_generator.rb
65
- - pkg/contentment-0.7.1.gem
66
65
  homepage: https://github.com/deathbob/Contentment
67
66
  licenses: []
68
67
  post_install_message: