about summary refs log tree commit diff stats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/initializers/assets.rb3
-rw-r--r--config/initializers/ckeditor.rb58
-rw-r--r--config/routes.rb14
3 files changed, 67 insertions, 8 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
diff --git a/config/routes.rb b/config/routes.rb index e409840..449cda1 100644 --- a/config/routes.rb +++ b/config/routes.rb
@@ -1,14 +1,14 @@
1Rails.application.routes.draw do 1Rails.application.routes.draw do
2 namespace :admin do
3 get '/', to: 'dashboard#index'
4
5 resources :blogs, except: [:show]
6 end
7
8 mount Ckeditor::Engine => '/ckeditor'
2 devise_for :users, controllers: { sessions: 'users/sessions' } 9 devise_for :users, controllers: { sessions: 'users/sessions' }
3 10
4 root "records#index" 11 root "records#index"
5 12
6 get 'says/:slug', to: 'entries#show' 13 get 'says/:slug', to: 'entries#show'
7 get 'says/:slug/edit', to: 'entries#edit'
8 put 'says/:slug', to: 'entries#update'
9 patch 'says/:slug', to: 'entries#update'
10
11 # get ':directory/:slug', to: 'entries#show', constraints: lambda { |request|
12 # Entry::DIRECTORIES.include? request.path_parameters['directory']
13 # }
14end 14end