dm_cms 4.2.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +22 -0
- data/README.md +31 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/dm_cms/admin.js +58 -0
- data/app/assets/javascripts/dm_cms/application.js +16 -0
- data/app/assets/stylesheets/dm_cms/admin.css +3 -0
- data/app/assets/stylesheets/dm_cms/application.css +13 -0
- data/app/controllers/dm_cms/admin/admin_controller.rb +14 -0
- data/app/controllers/dm_cms/admin/cms_blogs_controller.rb +89 -0
- data/app/controllers/dm_cms/admin/cms_contentitems_controller.rb +96 -0
- data/app/controllers/dm_cms/admin/cms_pages_controller.rb +100 -0
- data/app/controllers/dm_cms/admin/cms_posts_controller.rb +67 -0
- data/app/controllers/dm_cms/admin/cms_snippets_controller.rb +73 -0
- data/app/controllers/dm_cms/admin/dashboard_controller.rb +12 -0
- data/app/controllers/dm_cms/admin/media_files_controller.rb +80 -0
- data/app/controllers/dm_cms/application_controller.rb +9 -0
- data/app/controllers/dm_cms/blogs_controller.rb +50 -0
- data/app/controllers/dm_cms/comments_controller.rb +3 -0
- data/app/controllers/dm_cms/contact_form_controller.rb +27 -0
- data/app/controllers/dm_cms/pages_controller.rb +67 -0
- data/app/controllers/dm_cms/posts_controller.rb +69 -0
- data/app/datatables/blog_user_datatable.rb +79 -0
- data/app/helpers/dm_cms/analytics_helper.rb +27 -0
- data/app/helpers/dm_cms/application_helper.rb +4 -0
- data/app/helpers/dm_cms/cms_contentitems_helper.rb +8 -0
- data/app/helpers/dm_cms/cms_pages_helper.rb +30 -0
- data/app/helpers/dm_cms/pages_helper.rb +204 -0
- data/app/helpers/dm_cms/posts_helper.rb +26 -0
- data/app/helpers/dm_cms/render_helper.rb +50 -0
- data/app/inputs/media_input.rb +17 -0
- data/app/liquid/tags/markdown.rb +30 -0
- data/app/mailers/post_notify_mailer.rb +36 -0
- data/app/models/cms_blog.rb +89 -0
- data/app/models/cms_contentitem.rb +76 -0
- data/app/models/cms_page.rb +227 -0
- data/app/models/cms_post.rb +76 -0
- data/app/models/cms_snippet.rb +42 -0
- data/app/models/contact_form.rb +28 -0
- data/app/models/dm_cms/concerns/ability.rb +54 -0
- data/app/models/dm_cms/permitted_params.rb +34 -0
- data/app/models/media_file.rb +102 -0
- data/app/presenters/cms_blog_presenter.rb +15 -0
- data/app/presenters/cms_page_presenter.rb +23 -0
- data/app/presenters/cms_post_presenter.rb +11 -0
- data/app/presenters/cms_snippet_presenter.rb +10 -0
- data/app/uploaders/media_uploader.rb +169 -0
- data/app/views/customized/analytics/_google_analytics.html.erb +11 -0
- data/app/views/dm_cms/admin/cms_blogs/_form.html.erb +34 -0
- data/app/views/dm_cms/admin/cms_blogs/edit.html.erb +2 -0
- data/app/views/dm_cms/admin/cms_blogs/index.html.erb +44 -0
- data/app/views/dm_cms/admin/cms_blogs/new.html.erb +2 -0
- data/app/views/dm_cms/admin/cms_blogs/show.html.erb +167 -0
- data/app/views/dm_cms/admin/cms_contentitems/_form.html.erb +43 -0
- data/app/views/dm_cms/admin/cms_contentitems/_form_dialog.html.erb +17 -0
- data/app/views/dm_cms/admin/cms_contentitems/edit.html.erb +1 -0
- data/app/views/dm_cms/admin/cms_contentitems/markdown.html.erb +21 -0
- data/app/views/dm_cms/admin/cms_contentitems/new_content.html.erb +1 -0
- data/app/views/dm_cms/admin/cms_pages/_content_toolbar.html.erb +11 -0
- data/app/views/dm_cms/admin/cms_pages/_form.html.erb +50 -0
- data/app/views/dm_cms/admin/cms_pages/_tree.html.erb +20 -0
- data/app/views/dm_cms/admin/cms_pages/_tree_sidebar.html.erb +8 -0
- data/app/views/dm_cms/admin/cms_pages/edit.html.erb +2 -0
- data/app/views/dm_cms/admin/cms_pages/index.html.erb +32 -0
- data/app/views/dm_cms/admin/cms_pages/new_page.html.erb +2 -0
- data/app/views/dm_cms/admin/cms_pages/show.html.erb +54 -0
- data/app/views/dm_cms/admin/cms_posts/_form.html.erb +59 -0
- data/app/views/dm_cms/admin/cms_posts/edit.html.erb +2 -0
- data/app/views/dm_cms/admin/cms_posts/new.html.erb +1 -0
- data/app/views/dm_cms/admin/cms_snippets/_form.html.erb +28 -0
- data/app/views/dm_cms/admin/cms_snippets/edit.html.erb +1 -0
- data/app/views/dm_cms/admin/cms_snippets/index.html.erb +29 -0
- data/app/views/dm_cms/admin/cms_snippets/new.html.erb +1 -0
- data/app/views/dm_cms/admin/dashboard/_widget_blog_comments.html.erb +37 -0
- data/app/views/dm_cms/admin/dashboard/widget_blog_comments.js.erb +1 -0
- data/app/views/dm_cms/admin/media_files/_form.html.erb +102 -0
- data/app/views/dm_cms/admin/media_files/edit.html.erb +3 -0
- data/app/views/dm_cms/admin/media_files/index.html.erb +98 -0
- data/app/views/dm_cms/admin/media_files/new.html.erb +3 -0
- data/app/views/dm_cms/admin/shared/_liquid_tags_ref.html.erb +35 -0
- data/app/views/dm_cms/blogs/show.html.erb +0 -0
- data/app/views/dm_cms/blogs/toggle_follow.js.coffee +5 -0
- data/app/views/dm_cms/contact_form/create.html.erb +2 -0
- data/app/views/dm_cms/contact_form/create.js.erb +2 -0
- data/app/views/dm_cms/pages/_content_fragment.html.erb +13 -0
- data/app/views/dm_cms/pages/_snippet_fragment.html.erb +12 -0
- data/app/views/dm_cms/pages/coming_soon.html.erb +2 -0
- data/app/views/dm_cms/pages/show.html.erb +0 -0
- data/app/views/dm_cms/posts/show.html.erb +0 -0
- data/app/views/dm_cms/shared/_comment.html.erb +22 -0
- data/app/views/dm_cms/shared/_comment_form.html.erb +16 -0
- data/app/views/dm_cms/shared/_comment_list.html.erb +11 -0
- data/app/views/dm_cms/shared/_social_buttons.html.erb +6 -0
- data/app/views/layouts/email_templates/dm_cms_email_layout.html.erb +320 -0
- data/app/views/layouts/email_templates/dm_cms_email_layout.text.erb +1 -0
- data/app/views/layouts/email_templates/dm_cms_post_notify.html.erb +13 -0
- data/app/views/layouts/email_templates/dm_cms_post_notify.text.erb +9 -0
- data/app/views/liquid_tags/_contact_form.html.erb +17 -0
- data/config/initializers/liquid_init.rb +2 -0
- data/config/locales/cms.cs.yml +42 -0
- data/config/locales/cms.de.yml +42 -0
- data/config/locales/cms.en.yml +42 -0
- data/config/locales/cms.fi.yml +42 -0
- data/config/locales/cms.ja.yml +42 -0
- data/config/routes.rb +70 -0
- data/db/migrate/20121103181909_create_cms.rb +91 -0
- data/db/migrate/20130206213720_add_account_to_cms.rb +10 -0
- data/db/migrate/20130507123255_create_blog.rb +61 -0
- data/db/migrate/20130531212537_add_notification_sent.rb +5 -0
- data/db/migrate/20130605184116_add_blog_comment.rb +7 -0
- data/db/migrate/20131128201053_add_blog_image.rb +5 -0
- data/db/migrate/20140217135228_rename_snippet_slug.rb +13 -0
- data/db/migrate/20140303121217_add_requires_subscription_blog.rb +7 -0
- data/db/migrate/20140328205246_add_pages_ranked_model.rb +22 -0
- data/db/migrate/20140423113417_add_blog_owner.rb +6 -0
- data/db/migrate/20140428122156_create_media_files.rb +29 -0
- data/db/migrate/20140523134543_add_cmspage_summary.rb +6 -0
- data/db/migrate/20140601151631_add_blog_image_email_header.rb +5 -0
- data/db/migrate/20141004154725_add_header_image.rb +9 -0
- data/db/migrate/20160821150108_index_foreign_keys_in_cms_blogs.rb +6 -0
- data/db/migrate/20160821150109_index_foreign_keys_in_cms_media_files.rb +6 -0
- data/db/migrate/20160821150110_index_foreign_keys_in_cms_posts.rb +6 -0
- data/lib/dm_cms.rb +4 -0
- data/lib/dm_cms/engine.rb +16 -0
- data/lib/dm_cms/liquid/filters/liquid_filters.rb +11 -0
- data/lib/dm_cms/liquid/tags/contact_form.rb +35 -0
- data/lib/dm_cms/liquid/tags/div.rb +42 -0
- data/lib/dm_cms/liquid/tags/image.rb +76 -0
- data/lib/dm_cms/liquid/tags/quote.rb +38 -0
- data/lib/dm_cms/liquid/tags/snippet.rb +37 -0
- data/lib/dm_cms/liquid/tags/url_asset.rb +41 -0
- data/lib/dm_cms/liquid/tags/url_media.rb +42 -0
- data/lib/dm_cms/liquid/tags/url_protected.rb +31 -0
- data/lib/tasks/dm_cms_tasks.rake +4 -0
- data/spec/controllers/admin/cms_blogs_controller_spec.rb +173 -0
- data/spec/controllers/admin/cms_pages_controller_spec.rb +182 -0
- data/spec/controllers/admin/cms_posts_controller_spec.rb +166 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/ability.rb +12 -0
- data/spec/dummy/app/models/user.rb +6 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +26 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +82 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/_themes_for_rails.rb +39 -0
- data/spec/dummy/config/initializers/account_initialization.rb +28 -0
- data/spec/dummy/config/initializers/assets.rb +8 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/dm_core.rb +6 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +19 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20141114170927_add_globalize_countries.dm_core.rb +50 -0
- data/spec/dummy/db/migrate/20141114170928_devise_create_users.dm_core.rb +46 -0
- data/spec/dummy/db/migrate/20141114170929_add_user_fields.dm_core.rb +14 -0
- data/spec/dummy/db/migrate/20141114170930_rolify_create_roles.dm_core.rb +20 -0
- data/spec/dummy/db/migrate/20141114170931_add_last_access.dm_core.rb +10 -0
- data/spec/dummy/db/migrate/20141114170932_create_versions.dm_core.rb +19 -0
- data/spec/dummy/db/migrate/20141114170933_add_object_changes_column_to_versions.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170934_create_dm_core_accounts.dm_core.rb +13 -0
- data/spec/dummy/db/migrate/20141114170935_add_account_to_users.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170936_create_preferences.dm_core.rb +13 -0
- data/spec/dummy/db/migrate/20141114170937_create_comments.dm_core.rb +22 -0
- data/spec/dummy/db/migrate/20141114170938_add_activity.dm_core.rb +21 -0
- data/spec/dummy/db/migrate/20141114170939_add_type_to_comments.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170940_add_category.dm_core.rb +28 -0
- data/spec/dummy/db/migrate/20141114170941_create_email_table.dm_core.rb +26 -0
- data/spec/dummy/db/migrate/20141114170942_add_user_profile.dm_core.rb +46 -0
- data/spec/dummy/db/migrate/20141114170943_add_profile_email.dm_core.rb +14 -0
- data/spec/dummy/db/migrate/20141114170944_create_payment_history.dm_core.rb +37 -0
- data/spec/dummy/db/migrate/20141114170945_change_anchor_field.dm_core.rb +10 -0
- data/spec/dummy/db/migrate/20141114170946_create_user_site_profile.dm_core.rb +27 -0
- data/spec/dummy/db/migrate/20141114170947_add_avatar.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170948_add_notify_to_payment_history.dm_core.rb +8 -0
- data/spec/dummy/db/migrate/20141114170949_acts_as_votable_migration.dm_core.rb +28 -0
- data/spec/dummy/db/migrate/20141114170950_add_user_site_profile_uuid.dm_core.rb +19 -0
- data/spec/dummy/db/migrate/20141114170951_add_invoice_id.dm_core.rb +7 -0
- data/spec/dummy/db/migrate/20141114170952_acts_as_follower_migration.dm_core.rb +18 -0
- data/spec/dummy/db/migrate/20141114170953_rename_invoice_id.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170954_add_core_addresses.dm_core.rb +18 -0
- data/spec/dummy/db/migrate/20141114170955_papertrail_increase_column.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170956_acts_as_taggable_on_migration.dm_core.rb +32 -0
- data/spec/dummy/db/migrate/20141114170957_add_missing_unique_indices.dm_core.rb +23 -0
- data/spec/dummy/db/migrate/20141114170958_add_taggings_counter_cache_to_tags.dm_core.rb +16 -0
- data/spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb +40 -0
- data/spec/dummy/db/migrate/20141114170960_add_missing_taggable_index.dm_core.rb +11 -0
- data/spec/dummy/db/migrate/20141114170961_create_documents.dm_knowledge.rb +19 -0
- data/spec/dummy/db/migrate/20141114170962_add_document_notes.dm_knowledge.rb +7 -0
- data/spec/dummy/db/migrate/20160128134522_add_favored_locale.dm_core.rb +17 -0
- data/spec/dummy/db/migrate/20160128134523_update_papertrail_v4.dm_core.rb +41 -0
- data/spec/dummy/db/schema.rb +590 -0
- data/spec/dummy/db/seeds.rb +18 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/themes/_mbus/_readme.md +6 -0
- data/spec/dummy/themes/_mbus/_theme.yml +21 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/application.js +9 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/bootstrap.js +2114 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/bootstrap.min.js +6 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/contact_me.js +75 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/jqBootstrapValidation.js +912 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/jquery-1.11.0.js +4 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/application.css +14 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/bootstrap.css +6203 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/bootstrap.min.css +5 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/css/font-awesome.css +1566 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/css/font-awesome.min.css +4 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/fonts/FontAwesome.otf +0 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/fonts/fontawesome-webfont.eot +0 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/fonts/fontawesome-webfont.svg +504 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf +0 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/fonts/fontawesome-webfont.woff +0 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/bordered-pulled.less +16 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/core.less +12 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/fixed-width.less +6 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/font-awesome.less +17 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/icons.less +506 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/larger.less +13 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/list.less +19 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/mixins.less +20 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/path.less +14 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/rotated-flipped.less +9 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/spinning.less +32 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/stacked.less +20 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/variables.less +515 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_bordered-pulled.scss +16 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_core.scss +12 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_fixed-width.scss +6 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_icons.scss +506 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_larger.scss +13 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_list.scss +19 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_mixins.scss +20 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_path.scss +14 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_rotated-flipped.scss +9 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_spinning.scss +32 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_stacked.scss +20 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_variables.scss +515 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/font-awesome.scss +17 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/modern-business.css +93 -0
- data/spec/dummy/themes/_mbus/theme_support/config/load_theme.rb +0 -0
- data/spec/dummy/themes/_mbus/theme_support/locales/site.cs.yml +57 -0
- data/spec/dummy/themes/_mbus/theme_support/locales/site.de.yml +57 -0
- data/spec/dummy/themes/_mbus/theme_support/locales/site.en.yml +57 -0
- data/spec/dummy/themes/_mbus/theme_support/locales/site.fi.yml +58 -0
- data/spec/dummy/themes/_mbus/theme_support/locales/site.ja.yml +57 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_blog_right_sidebar.html.erb +91 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_comment.html.erb +21 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_comment_form.html.erb +16 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_comment_list.html.erb +7 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_comment_section.html.erb +17 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_page_footer.html.erb +11 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_page_header.html.erb +39 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_page_top.html.erb +24 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_post_summary_item.html.erb +11 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_social_buttons_initialization.html.erb +10 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/blog.html.erb +47 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/blog_post.html.erb +55 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/content_full_width.html.erb +28 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/content_with_left_nav.html.erb +44 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/index.html.erb +19 -0
- data/spec/dummy/themes/local/_theme.yml +8 -0
- data/spec/factories/accounts.rb +17 -0
- data/spec/factories/blogs.rb +19 -0
- data/spec/factories/posts.rb +23 -0
- data/spec/factories/user_profiles.rb +10 -0
- data/spec/factories/users.rb +19 -0
- data/spec/features/admin/blog_admin_spec.rb +16 -0
- data/spec/models/cms_blog_spec.rb +37 -0
- data/spec/models/cms_page_spec.rb +9 -0
- data/spec/models/cms_post_spec.rb +44 -0
- data/spec/rails_helper.rb +70 -0
- data/spec/spec_helper.rb +85 -0
- data/spec/support/accounts.rb +17 -0
- data/spec/support/devise.rb +44 -0
- data/spec/support/fix_locale.rb +57 -0
- metadata +545 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140501160009)
|
2
|
+
# This migration comes from acts_as_taggable_on_engine (originally 1)
|
3
|
+
class ActsAsTaggableOnMigration < ActiveRecord::Migration
|
4
|
+
def self.up
|
5
|
+
create_table :tags do |t|
|
6
|
+
t.string :name
|
7
|
+
end
|
8
|
+
|
9
|
+
create_table :taggings do |t|
|
10
|
+
t.references :tag
|
11
|
+
|
12
|
+
# You should make sure that the column created is
|
13
|
+
# long enough to store the required class names.
|
14
|
+
t.references :taggable, :polymorphic => true
|
15
|
+
t.references :tagger, :polymorphic => true
|
16
|
+
|
17
|
+
# Limit is created to prevent MySQL error on index
|
18
|
+
# length for MyISAM table type: http://bit.ly/vgW2Ql
|
19
|
+
t.string :context, :limit => 128
|
20
|
+
|
21
|
+
t.datetime :created_at
|
22
|
+
end
|
23
|
+
|
24
|
+
add_index :taggings, :tag_id
|
25
|
+
add_index :taggings, [:taggable_id, :taggable_type, :context]
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.down
|
29
|
+
drop_table :taggings
|
30
|
+
drop_table :tags
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140501160010)
|
2
|
+
# This migration comes from acts_as_taggable_on_engine (originally 2)
|
3
|
+
class AddMissingUniqueIndices < ActiveRecord::Migration
|
4
|
+
|
5
|
+
def self.up
|
6
|
+
add_index :tags, :name, unique: true
|
7
|
+
|
8
|
+
remove_index :taggings, :tag_id
|
9
|
+
remove_index :taggings, [:taggable_id, :taggable_type, :context]
|
10
|
+
add_index :taggings,
|
11
|
+
[:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
|
12
|
+
unique: true, name: 'taggings_idx'
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
remove_index :tags, :name
|
17
|
+
|
18
|
+
remove_index :taggings, name: 'taggings_idx'
|
19
|
+
add_index :taggings, :tag_id
|
20
|
+
add_index :taggings, [:taggable_id, :taggable_type, :context]
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140501160011)
|
2
|
+
# This migration comes from acts_as_taggable_on_engine (originally 3)
|
3
|
+
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
|
4
|
+
def self.up
|
5
|
+
add_column :tags, :taggings_count, :integer, :default => 0
|
6
|
+
|
7
|
+
ActsAsTaggableOn::Tag.reset_column_information
|
8
|
+
ActsAsTaggableOn::Tag.find_each do |tag|
|
9
|
+
ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
remove_column :tags, :taggings_count
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140529164730)
|
2
|
+
class CreateCustomFields < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :core_custom_field_defs do |t|
|
5
|
+
t.references :owner, polymorphic: true
|
6
|
+
t.string :name
|
7
|
+
t.string :field_type
|
8
|
+
t.integer :row_order
|
9
|
+
t.boolean :required, default: false
|
10
|
+
t.string :properties, limit: 2048
|
11
|
+
t.timestamps null: true
|
12
|
+
t.integer :account_id
|
13
|
+
end
|
14
|
+
|
15
|
+
add_index :core_custom_field_defs, :account_id
|
16
|
+
add_index :core_custom_field_defs, [:owner_id, :owner_type]
|
17
|
+
|
18
|
+
create_table :core_custom_field_def_translations, force: true do |t|
|
19
|
+
t.integer :core_custom_field_def_id
|
20
|
+
t.string :locale
|
21
|
+
t.string :label
|
22
|
+
t.text :description
|
23
|
+
t.datetime :created_at
|
24
|
+
t.datetime :updated_at
|
25
|
+
end
|
26
|
+
|
27
|
+
add_index :core_custom_field_def_translations, [:core_custom_field_def_id], name: 'core_custom_field_def_translations_index'
|
28
|
+
|
29
|
+
create_table :core_custom_fields do |t|
|
30
|
+
t.references :owner, polymorphic: true
|
31
|
+
t.integer :custom_field_def_id
|
32
|
+
t.string :field_data, limit: 4096
|
33
|
+
t.timestamps null: true
|
34
|
+
t.integer :account_id
|
35
|
+
end
|
36
|
+
|
37
|
+
add_index :core_custom_fields, :account_id
|
38
|
+
add_index :core_custom_fields, [:owner_id, :owner_type]
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140709145503)
|
2
|
+
# This migration comes from acts_as_taggable_on_engine (originally 4)
|
3
|
+
class AddMissingTaggableIndex < ActiveRecord::Migration
|
4
|
+
def self.up
|
5
|
+
add_index :taggings, [:taggable_id, :taggable_type, :context]
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_index :taggings, [:taggable_id, :taggable_type, :context]
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# This migration comes from dm_knowledge (originally 20140918124007)
|
2
|
+
class CreateDocuments < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :knw_documents, :force => true do |t|
|
5
|
+
t.string :title
|
6
|
+
t.string :subtitle
|
7
|
+
t.text :content
|
8
|
+
t.text :summary
|
9
|
+
t.datetime :original_date
|
10
|
+
t.boolean :published
|
11
|
+
t.boolean :is_public
|
12
|
+
t.boolean :requires_login
|
13
|
+
t.datetime :updated_on
|
14
|
+
t.datetime :created_on
|
15
|
+
t.integer :account_id
|
16
|
+
t.integer :lock_version, :default => 0, :null => false
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20141216094639)
|
2
|
+
class AddFavoredLocale < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
add_column :user_profiles, :favored_locale, :string
|
5
|
+
|
6
|
+
locale_map = {'DE' => :de, 'AT' => :de, 'CH' => :de, 'JP' => :ja, 'FI' => :fi}
|
7
|
+
UserProfile.all.find_each do |user_profile|
|
8
|
+
country_code = user_profile.country.code
|
9
|
+
locale = locale_map[country_code].nil? ? :en : locale_map[country_code]
|
10
|
+
user_profile.update_attribute(:favored_locale, locale)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def down
|
15
|
+
remove_column :user_profiles, :favored_locale
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20160128094739)
|
2
|
+
# Migration for upgrading PaperTrail from V3 to V4
|
3
|
+
#------------------------------------------------------------------------------
|
4
|
+
class UpdatePapertrailV4 < ActiveRecord::Migration
|
5
|
+
# The largest text column available in all supported RDBMS is
|
6
|
+
# 1024^3 - 1 bytes, roughly one gibibyte. We specify a size
|
7
|
+
# so that MySQL will use `longtext` instead of `text`. Otherwise,
|
8
|
+
# when serializing very large objects, `text` might not be big enough.
|
9
|
+
TEXT_BYTES = 1_073_741_823
|
10
|
+
|
11
|
+
def up
|
12
|
+
change_column :versions, :created_at, :datetime, precision: 6
|
13
|
+
change_column :versions, :object, :text, limit: TEXT_BYTES
|
14
|
+
change_column :versions, :object_changes, :text, limit: TEXT_BYTES
|
15
|
+
add_column :versions, :transaction_id, :integer
|
16
|
+
add_index :versions, [:transaction_id]
|
17
|
+
|
18
|
+
create_table :version_associations do |t|
|
19
|
+
t.integer :version_id
|
20
|
+
t.string :foreign_key_name, :null => false
|
21
|
+
t.integer :foreign_key_id
|
22
|
+
end
|
23
|
+
add_index :version_associations, [:version_id]
|
24
|
+
add_index :version_associations,
|
25
|
+
[:foreign_key_name, :foreign_key_id],
|
26
|
+
:name => 'index_version_associations_on_foreign_key'
|
27
|
+
end
|
28
|
+
|
29
|
+
def down
|
30
|
+
change_column :versions, :created_at, :datetime
|
31
|
+
change_column :versions, :object, :mediumtext
|
32
|
+
change_column :versions, :object_changes, :mediumtext
|
33
|
+
remove_index :versions, [:transaction_id]
|
34
|
+
remove_column :versions, :transaction_id
|
35
|
+
|
36
|
+
remove_index :version_associations, [:version_id]
|
37
|
+
remove_index :version_associations,
|
38
|
+
:name => 'index_version_associations_on_foreign_key'
|
39
|
+
drop_table :version_associations
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,590 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20160128134523) do
|
15
|
+
|
16
|
+
create_table "cms_blog_translations", force: :cascade do |t|
|
17
|
+
t.integer "cms_blog_id"
|
18
|
+
t.string "locale"
|
19
|
+
t.string "title"
|
20
|
+
t.datetime "created_at"
|
21
|
+
t.datetime "updated_at"
|
22
|
+
end
|
23
|
+
|
24
|
+
add_index "cms_blog_translations", ["cms_blog_id"], name: "index_cms_blog_translations_on_cms_blog_id"
|
25
|
+
|
26
|
+
create_table "cms_blogs", force: :cascade do |t|
|
27
|
+
t.string "slug"
|
28
|
+
t.boolean "published", default: false
|
29
|
+
t.boolean "is_public", default: false
|
30
|
+
t.boolean "requires_login", default: false
|
31
|
+
t.integer "row_order"
|
32
|
+
t.datetime "updated_on"
|
33
|
+
t.datetime "created_on"
|
34
|
+
t.integer "account_id"
|
35
|
+
t.integer "lock_version", default: 0, null: false
|
36
|
+
t.boolean "comments_allowed"
|
37
|
+
t.string "header_image"
|
38
|
+
t.boolean "requires_subscription", default: false
|
39
|
+
t.integer "owner_id"
|
40
|
+
t.string "owner_type"
|
41
|
+
t.string "image_email_header"
|
42
|
+
end
|
43
|
+
|
44
|
+
add_index "cms_blogs", ["published"], name: "cms_blogs_published_index"
|
45
|
+
add_index "cms_blogs", ["slug"], name: "blogname_key"
|
46
|
+
|
47
|
+
create_table "cms_contentitem_translations", force: :cascade do |t|
|
48
|
+
t.integer "cms_contentitem_id"
|
49
|
+
t.string "locale"
|
50
|
+
t.text "content"
|
51
|
+
t.datetime "created_at"
|
52
|
+
t.datetime "updated_at"
|
53
|
+
end
|
54
|
+
|
55
|
+
add_index "cms_contentitem_translations", ["cms_contentitem_id"], name: "index_072c3a76f87c96e2f91149eccd2a283dca2b613f"
|
56
|
+
|
57
|
+
create_table "cms_contentitems", force: :cascade do |t|
|
58
|
+
t.integer "cms_page_id"
|
59
|
+
t.string "itemtype", limit: 30, default: "textile"
|
60
|
+
t.string "container", limit: 30
|
61
|
+
t.integer "row_order", default: 0
|
62
|
+
t.boolean "enable_cache", default: true, null: false
|
63
|
+
t.datetime "created_on"
|
64
|
+
t.datetime "updated_on"
|
65
|
+
t.integer "lock_version", default: 0
|
66
|
+
t.integer "account_id"
|
67
|
+
end
|
68
|
+
|
69
|
+
add_index "cms_contentitems", ["account_id"], name: "index_cms_contentitems_on_account_id"
|
70
|
+
add_index "cms_contentitems", ["cms_page_id"], name: "cms_contentitems_cms_page_id_index"
|
71
|
+
|
72
|
+
create_table "cms_media_file_translations", force: :cascade do |t|
|
73
|
+
t.integer "cms_media_file_id"
|
74
|
+
t.string "locale"
|
75
|
+
t.string "title"
|
76
|
+
t.string "description"
|
77
|
+
t.datetime "created_at"
|
78
|
+
t.datetime "updated_at"
|
79
|
+
end
|
80
|
+
|
81
|
+
add_index "cms_media_file_translations", ["cms_media_file_id"], name: "index_cms_media_file_translations_on_cms_media_file_id"
|
82
|
+
|
83
|
+
create_table "cms_media_files", force: :cascade do |t|
|
84
|
+
t.string "media"
|
85
|
+
t.integer "media_file_size"
|
86
|
+
t.string "media_content_type"
|
87
|
+
t.string "folder"
|
88
|
+
t.boolean "generate_retina"
|
89
|
+
t.integer "user_id"
|
90
|
+
t.datetime "created_at"
|
91
|
+
t.datetime "updated_at"
|
92
|
+
t.integer "account_id"
|
93
|
+
end
|
94
|
+
|
95
|
+
add_index "cms_media_files", ["media", "folder", "account_id"], name: "index_media_folder_account_id", unique: true
|
96
|
+
|
97
|
+
create_table "cms_page_translations", force: :cascade do |t|
|
98
|
+
t.integer "cms_page_id"
|
99
|
+
t.string "locale"
|
100
|
+
t.string "title"
|
101
|
+
t.string "menutitle"
|
102
|
+
t.datetime "created_at"
|
103
|
+
t.datetime "updated_at"
|
104
|
+
t.text "summary"
|
105
|
+
end
|
106
|
+
|
107
|
+
add_index "cms_page_translations", ["cms_page_id"], name: "index_cms_page_translations_on_cms_page_id"
|
108
|
+
|
109
|
+
create_table "cms_pages", force: :cascade do |t|
|
110
|
+
t.string "slug", limit: 50, default: "", null: false
|
111
|
+
t.string "pagetype", limit: 20, default: "content", null: false
|
112
|
+
t.boolean "published", default: false, null: false
|
113
|
+
t.string "template", limit: 50, default: "", null: false
|
114
|
+
t.string "link", default: "", null: false
|
115
|
+
t.string "menuimage"
|
116
|
+
t.boolean "requires_login", default: false
|
117
|
+
t.string "ancestry"
|
118
|
+
t.integer "ancestry_depth", default: 0
|
119
|
+
t.datetime "updated_on"
|
120
|
+
t.datetime "created_on"
|
121
|
+
t.integer "lock_version", default: 0, null: false
|
122
|
+
t.integer "account_id"
|
123
|
+
t.boolean "requires_subscription", default: false
|
124
|
+
t.boolean "is_public", default: true
|
125
|
+
t.integer "row_order"
|
126
|
+
t.string "featured_image"
|
127
|
+
t.string "header_image"
|
128
|
+
end
|
129
|
+
|
130
|
+
add_index "cms_pages", ["account_id"], name: "index_cms_pages_on_account_id"
|
131
|
+
add_index "cms_pages", ["ancestry"], name: "index_cms_pages_on_ancestry"
|
132
|
+
add_index "cms_pages", ["ancestry_depth"], name: "index_cms_pages_on_ancestry_depth"
|
133
|
+
add_index "cms_pages", ["published"], name: "cms_pages_published_index"
|
134
|
+
add_index "cms_pages", ["slug"], name: "pagename_key"
|
135
|
+
|
136
|
+
create_table "cms_post_translations", force: :cascade do |t|
|
137
|
+
t.integer "cms_post_id"
|
138
|
+
t.string "locale"
|
139
|
+
t.string "title"
|
140
|
+
t.text "content"
|
141
|
+
t.text "summary"
|
142
|
+
t.datetime "created_at"
|
143
|
+
t.datetime "updated_at"
|
144
|
+
end
|
145
|
+
|
146
|
+
add_index "cms_post_translations", ["cms_post_id"], name: "index_cms_post_translations_on_cms_post_id"
|
147
|
+
|
148
|
+
create_table "cms_posts", force: :cascade do |t|
|
149
|
+
t.string "slug"
|
150
|
+
t.integer "cms_blog_id"
|
151
|
+
t.string "featured_image"
|
152
|
+
t.datetime "published_on"
|
153
|
+
t.datetime "updated_on"
|
154
|
+
t.datetime "created_on"
|
155
|
+
t.integer "account_id"
|
156
|
+
t.integer "lock_version", default: 0, null: false
|
157
|
+
t.datetime "notification_sent_on"
|
158
|
+
t.integer "comments_count", default: 0
|
159
|
+
t.boolean "comments_allowed"
|
160
|
+
end
|
161
|
+
|
162
|
+
add_index "cms_posts", ["published_on"], name: "cms_posts_published_index"
|
163
|
+
add_index "cms_posts", ["slug"], name: "postname_key"
|
164
|
+
|
165
|
+
create_table "cms_snippet_translations", force: :cascade do |t|
|
166
|
+
t.integer "cms_snippet_id"
|
167
|
+
t.string "locale"
|
168
|
+
t.text "content"
|
169
|
+
t.datetime "created_at"
|
170
|
+
t.datetime "updated_at"
|
171
|
+
end
|
172
|
+
|
173
|
+
add_index "cms_snippet_translations", ["cms_snippet_id"], name: "index_cms_snippet_translations_on_cms_snippet_id"
|
174
|
+
|
175
|
+
create_table "cms_snippets", force: :cascade do |t|
|
176
|
+
t.string "itemtype", limit: 30, default: "markdown"
|
177
|
+
t.string "slug"
|
178
|
+
t.string "description"
|
179
|
+
t.boolean "enable_cache", default: true, null: false
|
180
|
+
t.boolean "published", default: true, null: false
|
181
|
+
t.datetime "created_on"
|
182
|
+
t.datetime "updated_on"
|
183
|
+
t.integer "lock_version", default: 0
|
184
|
+
t.integer "account_id"
|
185
|
+
end
|
186
|
+
|
187
|
+
add_index "cms_snippets", ["account_id"], name: "index_cms_snippets_on_account_id"
|
188
|
+
add_index "cms_snippets", ["slug"], name: "index_cms_snippets_on_slug"
|
189
|
+
|
190
|
+
create_table "core_accounts", force: :cascade do |t|
|
191
|
+
t.string "company_name"
|
192
|
+
t.string "contact_email"
|
193
|
+
t.string "domain"
|
194
|
+
t.string "account_prefix"
|
195
|
+
t.integer "default_site_id"
|
196
|
+
t.datetime "created_at"
|
197
|
+
t.datetime "updated_at"
|
198
|
+
t.integer "next_invoice_num", default: 1000
|
199
|
+
end
|
200
|
+
|
201
|
+
create_table "core_activities", force: :cascade do |t|
|
202
|
+
t.integer "account_id"
|
203
|
+
t.integer "user_id"
|
204
|
+
t.string "browser"
|
205
|
+
t.string "session_id"
|
206
|
+
t.string "ip_address"
|
207
|
+
t.string "controller"
|
208
|
+
t.string "action"
|
209
|
+
t.string "params"
|
210
|
+
t.string "slug"
|
211
|
+
t.string "lesson"
|
212
|
+
t.datetime "created_at"
|
213
|
+
end
|
214
|
+
|
215
|
+
add_index "core_activities", ["account_id"], name: "index_core_activities_on_account_id"
|
216
|
+
add_index "core_activities", ["user_id"], name: "index_core_activities_on_user_id"
|
217
|
+
|
218
|
+
create_table "core_addresses", force: :cascade do |t|
|
219
|
+
t.string "line1"
|
220
|
+
t.string "line2"
|
221
|
+
t.string "city"
|
222
|
+
t.string "state"
|
223
|
+
t.string "zip"
|
224
|
+
t.string "country_code", limit: 2
|
225
|
+
t.integer "addressable_id"
|
226
|
+
t.string "addressable_type"
|
227
|
+
t.datetime "created_at"
|
228
|
+
t.datetime "updated_at"
|
229
|
+
end
|
230
|
+
|
231
|
+
add_index "core_addresses", ["addressable_type", "addressable_id"], name: "index_core_addresses_on_addressable_type_and_addressable_id", unique: true
|
232
|
+
|
233
|
+
create_table "core_categories", force: :cascade do |t|
|
234
|
+
t.string "type"
|
235
|
+
t.integer "row_order"
|
236
|
+
t.integer "account_id"
|
237
|
+
t.datetime "created_on"
|
238
|
+
t.datetime "updated_on"
|
239
|
+
end
|
240
|
+
|
241
|
+
create_table "core_category_translations", force: :cascade do |t|
|
242
|
+
t.integer "core_category_id"
|
243
|
+
t.string "locale"
|
244
|
+
t.string "name"
|
245
|
+
t.string "description"
|
246
|
+
t.datetime "created_at"
|
247
|
+
t.datetime "updated_at"
|
248
|
+
end
|
249
|
+
|
250
|
+
add_index "core_category_translations", ["core_category_id"], name: "index_category_translation"
|
251
|
+
|
252
|
+
create_table "core_comments", force: :cascade do |t|
|
253
|
+
t.string "title", limit: 50, default: ""
|
254
|
+
t.text "body"
|
255
|
+
t.integer "commentable_id"
|
256
|
+
t.string "commentable_type"
|
257
|
+
t.integer "user_id"
|
258
|
+
t.string "role", default: "comments"
|
259
|
+
t.integer "account_id"
|
260
|
+
t.datetime "created_at"
|
261
|
+
t.datetime "updated_at"
|
262
|
+
t.string "type"
|
263
|
+
t.string "ancestry"
|
264
|
+
t.integer "ancestry_depth", default: 0
|
265
|
+
end
|
266
|
+
|
267
|
+
add_index "core_comments", ["commentable_id"], name: "index_core_comments_on_commentable_id"
|
268
|
+
add_index "core_comments", ["commentable_type"], name: "index_core_comments_on_commentable_type"
|
269
|
+
add_index "core_comments", ["user_id"], name: "index_core_comments_on_user_id"
|
270
|
+
|
271
|
+
create_table "core_custom_field_def_translations", force: :cascade do |t|
|
272
|
+
t.integer "core_custom_field_def_id"
|
273
|
+
t.string "locale"
|
274
|
+
t.string "label"
|
275
|
+
t.text "description"
|
276
|
+
t.datetime "created_at"
|
277
|
+
t.datetime "updated_at"
|
278
|
+
end
|
279
|
+
|
280
|
+
add_index "core_custom_field_def_translations", ["core_custom_field_def_id"], name: "core_custom_field_def_translations_index"
|
281
|
+
|
282
|
+
create_table "core_custom_field_defs", force: :cascade do |t|
|
283
|
+
t.integer "owner_id"
|
284
|
+
t.string "owner_type"
|
285
|
+
t.string "name"
|
286
|
+
t.string "field_type"
|
287
|
+
t.integer "row_order"
|
288
|
+
t.boolean "required", default: false
|
289
|
+
t.string "properties", limit: 2048
|
290
|
+
t.datetime "created_at"
|
291
|
+
t.datetime "updated_at"
|
292
|
+
t.integer "account_id"
|
293
|
+
end
|
294
|
+
|
295
|
+
add_index "core_custom_field_defs", ["account_id"], name: "index_core_custom_field_defs_on_account_id"
|
296
|
+
add_index "core_custom_field_defs", ["owner_id", "owner_type"], name: "index_core_custom_field_defs_on_owner_id_and_owner_type"
|
297
|
+
|
298
|
+
create_table "core_custom_fields", force: :cascade do |t|
|
299
|
+
t.integer "owner_id"
|
300
|
+
t.string "owner_type"
|
301
|
+
t.integer "custom_field_def_id"
|
302
|
+
t.string "field_data", limit: 4096
|
303
|
+
t.datetime "created_at"
|
304
|
+
t.datetime "updated_at"
|
305
|
+
t.integer "account_id"
|
306
|
+
end
|
307
|
+
|
308
|
+
add_index "core_custom_fields", ["account_id"], name: "index_core_custom_fields_on_account_id"
|
309
|
+
add_index "core_custom_fields", ["owner_id", "owner_type"], name: "index_core_custom_fields_on_owner_id_and_owner_type"
|
310
|
+
|
311
|
+
create_table "core_payment_histories", force: :cascade do |t|
|
312
|
+
t.integer "owner_id"
|
313
|
+
t.string "owner_type", limit: 30
|
314
|
+
t.string "anchor_id", limit: 20
|
315
|
+
t.string "order_ref"
|
316
|
+
t.string "item_ref"
|
317
|
+
t.string "item_name"
|
318
|
+
t.integer "quantity"
|
319
|
+
t.string "cost"
|
320
|
+
t.string "discount"
|
321
|
+
t.integer "total_cents"
|
322
|
+
t.string "total_currency", limit: 3
|
323
|
+
t.string "payment_method"
|
324
|
+
t.datetime "payment_date"
|
325
|
+
t.string "bill_to_name"
|
326
|
+
t.text "item_details"
|
327
|
+
t.text "order_details"
|
328
|
+
t.string "status"
|
329
|
+
t.integer "user_profile_id"
|
330
|
+
t.datetime "created_on"
|
331
|
+
t.integer "account_id"
|
332
|
+
t.text "notify_data"
|
333
|
+
t.string "transaction_id"
|
334
|
+
end
|
335
|
+
|
336
|
+
add_index "core_payment_histories", ["anchor_id"], name: "index_payment_histories_on_anchor_id"
|
337
|
+
add_index "core_payment_histories", ["item_ref"], name: "index_payment_histories_on_item_ref"
|
338
|
+
add_index "core_payment_histories", ["order_ref"], name: "index_payment_histories_on_order_ref"
|
339
|
+
add_index "core_payment_histories", ["owner_id"], name: "index_payment_histories_on_owner_id"
|
340
|
+
add_index "core_payment_histories", ["owner_type"], name: "index_payment_histories_on_owner_type"
|
341
|
+
|
342
|
+
create_table "core_system_email_translations", force: :cascade do |t|
|
343
|
+
t.integer "core_system_email_id"
|
344
|
+
t.string "locale"
|
345
|
+
t.string "subject"
|
346
|
+
t.text "body"
|
347
|
+
t.datetime "created_at"
|
348
|
+
t.datetime "updated_at"
|
349
|
+
end
|
350
|
+
|
351
|
+
create_table "core_system_emails", force: :cascade do |t|
|
352
|
+
t.string "email_type"
|
353
|
+
t.integer "emailable_id"
|
354
|
+
t.string "emailable_type"
|
355
|
+
t.datetime "created_at"
|
356
|
+
t.datetime "updated_at"
|
357
|
+
t.integer "account_id"
|
358
|
+
end
|
359
|
+
|
360
|
+
create_table "follows", force: :cascade do |t|
|
361
|
+
t.integer "followable_id", null: false
|
362
|
+
t.string "followable_type", null: false
|
363
|
+
t.integer "follower_id", null: false
|
364
|
+
t.string "follower_type", null: false
|
365
|
+
t.boolean "blocked", default: false, null: false
|
366
|
+
t.datetime "created_at"
|
367
|
+
t.datetime "updated_at"
|
368
|
+
end
|
369
|
+
|
370
|
+
add_index "follows", ["followable_id", "followable_type"], name: "fk_followables"
|
371
|
+
add_index "follows", ["follower_id", "follower_type"], name: "fk_follows"
|
372
|
+
|
373
|
+
create_table "globalize_countries", force: :cascade do |t|
|
374
|
+
t.string "code", limit: 2
|
375
|
+
t.string "english_name"
|
376
|
+
t.string "date_format"
|
377
|
+
t.string "currency_format"
|
378
|
+
t.string "currency_code", limit: 3
|
379
|
+
t.string "thousands_sep", limit: 2
|
380
|
+
t.string "decimal_sep", limit: 2
|
381
|
+
t.string "currency_decimal_sep", limit: 2
|
382
|
+
t.string "number_grouping_scheme"
|
383
|
+
t.string "continent"
|
384
|
+
t.string "locale"
|
385
|
+
end
|
386
|
+
|
387
|
+
add_index "globalize_countries", ["code"], name: "index_globalize_countries_on_code"
|
388
|
+
add_index "globalize_countries", ["locale"], name: "index_globalize_countries_on_locale"
|
389
|
+
|
390
|
+
create_table "globalize_languages", force: :cascade do |t|
|
391
|
+
t.string "iso_639_1", limit: 2
|
392
|
+
t.string "iso_639_2", limit: 3
|
393
|
+
t.string "iso_639_3", limit: 3
|
394
|
+
t.string "rfc_3066"
|
395
|
+
t.string "english_name"
|
396
|
+
t.string "english_name_locale"
|
397
|
+
t.string "english_name_modifier"
|
398
|
+
t.string "native_name"
|
399
|
+
t.string "native_name_locale"
|
400
|
+
t.string "native_name_modifier"
|
401
|
+
t.boolean "macro_language"
|
402
|
+
t.string "direction"
|
403
|
+
t.string "pluralization"
|
404
|
+
t.string "scope", limit: 1
|
405
|
+
end
|
406
|
+
|
407
|
+
add_index "globalize_languages", ["iso_639_1"], name: "index_globalize_languages_on_iso_639_1"
|
408
|
+
add_index "globalize_languages", ["iso_639_2"], name: "index_globalize_languages_on_iso_639_2"
|
409
|
+
add_index "globalize_languages", ["iso_639_3"], name: "index_globalize_languages_on_iso_639_3"
|
410
|
+
add_index "globalize_languages", ["rfc_3066"], name: "index_globalize_languages_on_rfc_3066"
|
411
|
+
|
412
|
+
create_table "knw_documents", force: :cascade do |t|
|
413
|
+
t.string "title"
|
414
|
+
t.string "subtitle"
|
415
|
+
t.text "content"
|
416
|
+
t.text "summary"
|
417
|
+
t.datetime "original_date"
|
418
|
+
t.boolean "published"
|
419
|
+
t.boolean "is_public"
|
420
|
+
t.boolean "requires_login"
|
421
|
+
t.datetime "updated_on"
|
422
|
+
t.datetime "created_on"
|
423
|
+
t.integer "account_id"
|
424
|
+
t.integer "lock_version", default: 0, null: false
|
425
|
+
t.string "slug"
|
426
|
+
t.text "notes"
|
427
|
+
end
|
428
|
+
|
429
|
+
create_table "preferences", force: :cascade do |t|
|
430
|
+
t.string "name", null: false
|
431
|
+
t.integer "owner_id", null: false
|
432
|
+
t.string "owner_type", null: false
|
433
|
+
t.integer "group_id"
|
434
|
+
t.string "group_type"
|
435
|
+
t.string "value"
|
436
|
+
t.datetime "created_at"
|
437
|
+
t.datetime "updated_at"
|
438
|
+
end
|
439
|
+
|
440
|
+
add_index "preferences", ["owner_id", "owner_type", "name", "group_id", "group_type"], name: "index_preferences_on_owner_and_name_and_preference", unique: true
|
441
|
+
|
442
|
+
create_table "roles", force: :cascade do |t|
|
443
|
+
t.string "name"
|
444
|
+
t.integer "resource_id"
|
445
|
+
t.string "resource_type"
|
446
|
+
t.datetime "created_at"
|
447
|
+
t.datetime "updated_at"
|
448
|
+
t.integer "account_id"
|
449
|
+
end
|
450
|
+
|
451
|
+
add_index "roles", ["account_id"], name: "index_roles_on_account_id"
|
452
|
+
add_index "roles", ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id"
|
453
|
+
add_index "roles", ["name"], name: "index_roles_on_name"
|
454
|
+
|
455
|
+
create_table "taggings", force: :cascade do |t|
|
456
|
+
t.integer "tag_id"
|
457
|
+
t.integer "taggable_id"
|
458
|
+
t.string "taggable_type"
|
459
|
+
t.integer "tagger_id"
|
460
|
+
t.string "tagger_type"
|
461
|
+
t.string "context", limit: 128
|
462
|
+
t.datetime "created_at"
|
463
|
+
end
|
464
|
+
|
465
|
+
add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
|
466
|
+
add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
|
467
|
+
|
468
|
+
create_table "tags", force: :cascade do |t|
|
469
|
+
t.string "name"
|
470
|
+
t.integer "taggings_count", default: 0
|
471
|
+
end
|
472
|
+
|
473
|
+
add_index "tags", ["name"], name: "index_tags_on_name", unique: true
|
474
|
+
|
475
|
+
create_table "user_profiles", force: :cascade do |t|
|
476
|
+
t.integer "user_id"
|
477
|
+
t.string "public_name", limit: 50, default: ""
|
478
|
+
t.string "first_name", limit: 50, default: ""
|
479
|
+
t.string "last_name", limit: 50, default: ""
|
480
|
+
t.string "address", limit: 70, default: ""
|
481
|
+
t.string "address2", limit: 70, default: ""
|
482
|
+
t.string "city", limit: 30, default: ""
|
483
|
+
t.string "state", limit: 30, default: ""
|
484
|
+
t.string "zipcode", limit: 10, default: ""
|
485
|
+
t.integer "country_id", default: 0
|
486
|
+
t.string "phone", limit: 20, default: ""
|
487
|
+
t.string "cell", limit: 20, default: ""
|
488
|
+
t.string "fax", limit: 20, default: ""
|
489
|
+
t.string "workphone", limit: 20, default: ""
|
490
|
+
t.string "website", limit: 50, default: ""
|
491
|
+
t.string "gender", limit: 1, default: ""
|
492
|
+
t.integer "status", default: 0
|
493
|
+
t.integer "lock_version", default: 0
|
494
|
+
t.datetime "created_at"
|
495
|
+
t.datetime "updated_at"
|
496
|
+
t.integer "account_id"
|
497
|
+
t.string "email"
|
498
|
+
t.string "public_avatar"
|
499
|
+
t.integer "public_avatar_file_size"
|
500
|
+
t.string "public_avatar_content_type"
|
501
|
+
t.string "private_avatar"
|
502
|
+
t.integer "private_avatar_file_size"
|
503
|
+
t.string "private_avatar_content_type"
|
504
|
+
t.boolean "use_private_avatar_for_public", default: false
|
505
|
+
t.string "favored_locale"
|
506
|
+
end
|
507
|
+
|
508
|
+
create_table "user_site_profiles", force: :cascade do |t|
|
509
|
+
t.integer "user_id"
|
510
|
+
t.datetime "last_access_at"
|
511
|
+
t.datetime "created_at"
|
512
|
+
t.datetime "updated_at"
|
513
|
+
t.integer "account_id"
|
514
|
+
t.string "uuid", limit: 40
|
515
|
+
end
|
516
|
+
|
517
|
+
add_index "user_site_profiles", ["uuid"], name: "index_user_site_profiles_on_uuid"
|
518
|
+
|
519
|
+
create_table "users", force: :cascade do |t|
|
520
|
+
t.string "email", default: "", null: false
|
521
|
+
t.string "encrypted_password", default: "", null: false
|
522
|
+
t.string "reset_password_token"
|
523
|
+
t.datetime "reset_password_sent_at"
|
524
|
+
t.datetime "remember_created_at"
|
525
|
+
t.integer "sign_in_count", default: 0
|
526
|
+
t.datetime "current_sign_in_at"
|
527
|
+
t.datetime "last_sign_in_at"
|
528
|
+
t.string "current_sign_in_ip"
|
529
|
+
t.string "last_sign_in_ip"
|
530
|
+
t.string "confirmation_token"
|
531
|
+
t.datetime "confirmed_at"
|
532
|
+
t.datetime "confirmation_sent_at"
|
533
|
+
t.string "unconfirmed_email"
|
534
|
+
t.datetime "created_at"
|
535
|
+
t.datetime "updated_at"
|
536
|
+
t.integer "account_id"
|
537
|
+
end
|
538
|
+
|
539
|
+
add_index "users", ["account_id"], name: "index_users_on_account_id"
|
540
|
+
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
|
541
|
+
add_index "users", ["email"], name: "index_users_on_email", unique: true
|
542
|
+
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
543
|
+
|
544
|
+
create_table "users_roles", id: false, force: :cascade do |t|
|
545
|
+
t.integer "user_id"
|
546
|
+
t.integer "role_id"
|
547
|
+
end
|
548
|
+
|
549
|
+
add_index "users_roles", ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id"
|
550
|
+
|
551
|
+
create_table "version_associations", force: :cascade do |t|
|
552
|
+
t.integer "version_id"
|
553
|
+
t.string "foreign_key_name", null: false
|
554
|
+
t.integer "foreign_key_id"
|
555
|
+
end
|
556
|
+
|
557
|
+
add_index "version_associations", ["foreign_key_name", "foreign_key_id"], name: "index_version_associations_on_foreign_key"
|
558
|
+
add_index "version_associations", ["version_id"], name: "index_version_associations_on_version_id"
|
559
|
+
|
560
|
+
create_table "versions", force: :cascade do |t|
|
561
|
+
t.string "item_type", null: false
|
562
|
+
t.integer "item_id", null: false
|
563
|
+
t.string "event", null: false
|
564
|
+
t.string "whodunnit"
|
565
|
+
t.text "object", limit: 1073741823
|
566
|
+
t.datetime "created_at"
|
567
|
+
t.text "object_changes", limit: 1073741823
|
568
|
+
t.string "locale"
|
569
|
+
t.integer "transaction_id"
|
570
|
+
end
|
571
|
+
|
572
|
+
add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
573
|
+
add_index "versions", ["transaction_id"], name: "index_versions_on_transaction_id"
|
574
|
+
|
575
|
+
create_table "votes", force: :cascade do |t|
|
576
|
+
t.integer "votable_id"
|
577
|
+
t.string "votable_type"
|
578
|
+
t.integer "voter_id"
|
579
|
+
t.string "voter_type"
|
580
|
+
t.boolean "vote_flag"
|
581
|
+
t.string "vote_scope"
|
582
|
+
t.integer "vote_weight"
|
583
|
+
t.datetime "created_at"
|
584
|
+
t.datetime "updated_at"
|
585
|
+
end
|
586
|
+
|
587
|
+
add_index "votes", ["votable_id", "votable_type", "vote_scope"], name: "index_votes_on_votable_id_and_votable_type_and_vote_scope"
|
588
|
+
add_index "votes", ["voter_id", "voter_type", "vote_scope"], name: "index_votes_on_voter_id_and_voter_type_and_vote_scope"
|
589
|
+
|
590
|
+
end
|