about summary refs log tree commit diff stats
path: root/config/initializers
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-07-02 13:03:43 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-07-02 13:03:43 -0400
commite47e83cf6bded3d1924b4d500193e7876833ef83 (patch)
tree058f011637e67455dcd8451fbfa784b5883c6f69 /config/initializers
parent528ccde8915cd1ed7a39e137dd4d98869797956a (diff)
downloadthoughts-e47e83cf6bded3d1924b4d500193e7876833ef83.tar.gz
thoughts-e47e83cf6bded3d1924b4d500193e7876833ef83.tar.bz2
thoughts-e47e83cf6bded3d1924b4d500193e7876833ef83.zip
Created admin panel
Currently allows you to create and edit blogs, including associated
records. Uses a WYSIWYG editor that allows uploading images.

Also included jQuery :(
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/assets.rb3
-rw-r--r--config/initializers/ckeditor.rb58
2 files changed, 60 insertions, 1 deletions
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 361538d..adbe234 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb
@@ -12,4 +12,5 @@ Rails.application.config.assets.paths << Rails.root.join('node_modules')
12# application.js, application.css, and all non-JS/CSS in the app/assets 12# application.js, application.css, and all non-JS/CSS in the app/assets
13# folder are already added. 13# folder are already added.
14# Rails.application.config.assets.precompile += %w( admin.js admin.css ) 14# Rails.application.config.assets.precompile += %w( admin.js admin.css )
15Rails.application.config.assets.precompile += %w( main userdata ) 15Rails.application.config.assets.precompile += %w( ckeditor/* )
16Rails.application.config.assets.precompile += %w( main userdata admin )
diff --git a/config/initializers/ckeditor.rb b/config/initializers/ckeditor.rb new file mode 100644 index 0000000..8f80a43 --- /dev/null +++ b/config/initializers/ckeditor.rb
@@ -0,0 +1,58 @@
1# Use this hook to configure ckeditor
2Ckeditor.setup do |config|
3 # ==> ORM configuration
4 # Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
5 # :mongoid (bson_ext recommended) by default. Other ORMs may be
6 # available as additional gems.
7 require 'ckeditor/orm/active_record'
8
9 # Allowed image file types for upload.
10 # Set to nil or [] (empty array) for all file types
11 # By default: %w(jpg jpeg png gif tiff)
12 # config.image_file_types = %w(jpg jpeg png gif tiff)
13
14 # Allowed flash file types for upload.
15 # Set to nil or [] (empty array) for all file types
16 # By default: %w(jpg jpeg png gif tiff)
17 # config.flash_file_types = %w(swf)
18
19 # Allowed attachment file types for upload.
20 # Set to nil or [] (empty array) for all file types
21 # By default: %w(doc docx xls odt ods pdf rar zip tar tar.gz swf)
22 # config.attachment_file_types = %w(doc docx xls odt ods pdf rar zip tar tar.gz swf)
23
24 # Setup authorization to be run as a before filter
25 # By default: there is no authorization.
26 # config.authorize_with :cancan
27
28 # Override parent controller CKEditor inherits from
29 # By default: 'ApplicationController'
30 # config.parent_controller = 'MyController'
31
32 # Asset model classes
33 # config.picture_model { Ckeditor::Picture }
34 # config.attachment_file_model { Ckeditor::AttachmentFile }
35
36 # Paginate assets
37 # By default: 24
38 # config.default_per_page = 24
39
40 # Customize ckeditor assets path
41 # By default: nil
42 # config.asset_path = 'http://www.example.com/assets/ckeditor/'
43
44 # To reduce the asset precompilation time, you can limit plugins and/or languages to those you need:
45 # By default: nil (no limit)
46 # config.assets_languages = ['en', 'uk']
47 # config.assets_plugins = ['image', 'smiley']
48
49 # CKEditor CDN
50 # More info here http://cdn.ckeditor.com/
51 # By default: nil (CDN disabled)
52 # config.cdn_url = '//cdn.ckeditor.com/4.7.1/standard/ckeditor.js'
53
54 # JS config url
55 # Used when CKEditor CDN enabled
56 # By default: "ckeditor/config.js"
57 # config.js_config_url = 'ckeditor/config.js'
58end