adminpanel 1.2.12 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +3 -4
- data/Gemfile +22 -20
- data/README.md +12 -9
- data/adminpanel.gemspec +29 -28
- data/app/assets/fonts/.keep +0 -0
- data/app/assets/javascripts/adminpanel/images_form.js +5 -2
- data/app/assets/javascripts/adminpanel/imagesloaded.js +5 -2
- data/app/assets/javascripts/adminpanel/tables.js +6 -3
- data/app/assets/javascripts/application-admin.js +2 -1
- data/app/assets/stylesheets/adminpanel/{_clearfix.css.scss → _clearfix.css} +0 -0
- data/app/assets/stylesheets/adminpanel/bootstrap.css +2 -2
- data/app/assets/stylesheets/adminpanel/medium-editor.css.scss +1 -1
- data/app/assets/stylesheets/application-admin.css +2 -1
- data/app/controllers/adminpanel/application_controller.rb +28 -21
- data/app/controllers/adminpanel/categories_controller.rb +16 -5
- data/app/controllers/adminpanel/galleries_controller.rb +11 -5
- data/app/controllers/adminpanel/sections_controller.rb +14 -0
- data/app/controllers/adminpanel/users_controller.rb +10 -80
- data/app/controllers/concerns/adminpanel/galleryzable_actions.rb +33 -0
- data/app/controllers/concerns/adminpanel/rest_actions.rb +109 -0
- data/app/helpers/adminpanel/application_helper.rb +0 -1
- data/app/helpers/adminpanel/custom_form_builder.rb +12 -13
- data/app/helpers/adminpanel/router_helper.rb +11 -2
- data/app/helpers/adminpanel/shared_pages_helper.rb +0 -1
- data/app/models/adminpanel/analytic.rb +3 -2
- data/app/models/adminpanel/gallery.rb +8 -4
- data/app/models/adminpanel/group.rb +1 -1
- data/app/models/adminpanel/image.rb +1 -2
- data/app/models/adminpanel/section.rb +19 -10
- data/app/models/adminpanel/user.rb +11 -3
- data/app/models/concerns/adminpanel/base.rb +149 -0
- data/app/models/concerns/adminpanel/galleryzation.rb +66 -0
- data/app/models/contact.rb +16 -9
- data/app/views/adminpanel/analytics/index.html.erb +2 -1
- data/app/views/adminpanel/categories/_categories_table.html.erb +6 -7
- data/app/views/adminpanel/categories/_category_form.html.erb +2 -2
- data/app/views/adminpanel/categories/create.js.erb +2 -2
- data/app/views/adminpanel/categories/index.html.erb +1 -1
- data/app/views/adminpanel/galleries/_galleries_table.html.erb +7 -7
- data/app/views/adminpanel/galleries/index.html.erb +6 -5
- data/app/views/adminpanel/sections/_sections_table.html.erb +2 -2
- data/app/views/adminpanel/sections/edit.html.erb +5 -3
- data/app/views/adminpanel/sections/show.html.erb +3 -3
- data/app/views/adminpanel/sessions/new.html.erb +1 -1
- data/app/views/layouts/_side_menu.html.erb +2 -2
- data/app/views/layouts/_top_bar.html.erb +3 -3
- data/app/views/layouts/admin-login.html.erb +0 -1
- data/app/views/layouts/admin.html.erb +3 -3
- data/app/views/shared/_delete_icon_button.html.erb +16 -0
- data/app/views/shared/_edit_icon_button.html.erb +14 -0
- data/app/views/shared/_error_messages.html.erb +1 -1
- data/app/views/shared/_form_fields.html.erb +15 -13
- data/app/views/shared/_gallery_entries.html.erb +2 -2
- data/app/views/shared/_init_editor.html.erb +5 -2
- data/app/views/shared/_new_resource_button.html.erb +18 -0
- data/app/views/shared/_remote_form_fields.html.erb +1 -1
- data/app/views/shared/_show_icon_button.html.erb +14 -0
- data/app/views/shared/edit.html.erb +3 -3
- data/app/views/shared/index.html.erb +13 -48
- data/app/views/shared/new.html.erb +3 -3
- data/app/views/shared/show.html.erb +5 -5
- data/config/initializers/pluralization_es.rb +16 -0
- data/config/locales/en.yml +89 -0
- data/config/locales/es.yml +4 -4
- data/config/routes.rb +15 -16
- data/lib/adminpanel.rb +8 -8
- data/lib/adminpanel/version.rb +1 -1
- data/lib/generators/adminpanel/gallery/gallery_generator.rb +12 -8
- data/lib/generators/adminpanel/gallery/templates/gallery_template.rb +2 -3
- data/lib/generators/adminpanel/initialize/templates/category_template.rb +2 -3
- data/lib/generators/adminpanel/resource/resource_generator.rb +24 -18
- data/lib/generators/adminpanel/resource/templates/controller.rb +5 -0
- data/lib/generators/adminpanel/resource/templates/resource.rb +3 -3
- data/lib/tasks/adminpanel/adminpanel.rake +43 -90
- data/spec/dummy/app/controllers/adminpanel/mugs_controller.rb +9 -0
- data/spec/dummy/app/controllers/adminpanel/products_controller.rb +12 -0
- data/spec/dummy/app/models/ability.rb +1 -1
- data/spec/dummy/app/models/adminpanel/categorization.rb +1 -2
- data/spec/dummy/app/models/adminpanel/category.rb +18 -19
- data/spec/dummy/app/models/adminpanel/mug.rb +37 -0
- data/spec/dummy/app/models/adminpanel/photo.rb +3 -3
- data/spec/dummy/app/models/adminpanel/product.rb +2 -2
- data/spec/dummy/config/application.rb +2 -11
- data/spec/dummy/config/database.yml +0 -6
- data/spec/dummy/config/environments/development.rb +11 -23
- data/spec/dummy/config/environments/production.rb +40 -32
- data/spec/dummy/config/environments/test.rb +13 -18
- data/spec/dummy/config/initializers/adminpanel_setup.rb +2 -1
- data/spec/dummy/config/locales/.keep +0 -0
- data/spec/dummy/db/schema.rb +68 -2
- data/spec/features/authentication_pages_spec.rb +15 -15
- data/spec/features/galleries_pages_spec.rb +30 -22
- data/spec/features/section_pages_spec.rb +15 -18
- data/spec/features/shared_pages_spec.rb +97 -127
- data/spec/generators/gallery_generator_spec.rb +2 -3
- data/spec/generators/resource_generator_spec.rb +20 -3
- data/spec/models/gallery_spec.rb +2 -2
- data/spec/models/section_spec.rb +8 -15
- data/spec/models/user_spec.rb +23 -39
- data/spec/spec_helper.rb +9 -1
- data/spec/support/factories.rb +52 -0
- data/spec/support/helper_methods.rb +25 -5
- data/spec/tasks/adminpanel_rake_spec.rb +11 -10
- metadata +361 -353
- data/app/assets/fonts/FontAwesome.otf +0 -0
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +0 -255
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/stylesheets/adminpanel/colorpicker.css +0 -7
- data/app/assets/stylesheets/adminpanel/elfinder.min.css +0 -59
- data/app/assets/stylesheets/adminpanel/font-awesome.min.css +0 -34
- data/app/helpers/adminpanel/pluralizations_helper.rb +0 -25
- data/app/helpers/adminpanel/rest_actions_helper.rb +0 -128
- data/app/views/adminpanel/galleries/delete.html.erb +0 -2
- data/app/views/adminpanel/galleries/edit.html.erb +0 -19
- data/app/views/adminpanel/galleries/new.html.erb +0 -18
- data/app/views/adminpanel/galleries/show.html.erb +0 -18
- data/app/views/adminpanel/galleries/update.html.erb +0 -2
- data/lib/adminpanel/active_record/adminpanel_extension.rb +0 -187
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/support/define_factory_models.rb +0 -45
- data/spec/support/submit_forms_without_button.rb +0 -17
- data/spec/support/test_database.rb +0 -76
- data/spec/uploaders/gallery_uploader_spec.rb +0 -37
- data/spec/uploaders/image_uploader_spec.rb +0 -31
@@ -1,4 +1,16 @@
|
|
1
1
|
module Adminpanel
|
2
2
|
class ProductsController < Adminpanel::ApplicationController
|
3
|
+
|
4
|
+
private
|
5
|
+
def product_params
|
6
|
+
params.require(:product).permit(
|
7
|
+
:price,
|
8
|
+
:name,
|
9
|
+
:category_ids,
|
10
|
+
:description,
|
11
|
+
:photos_attributes => [:product_id, :file]
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
3
15
|
end
|
4
16
|
end
|
@@ -1,27 +1,26 @@
|
|
1
1
|
module Adminpanel
|
2
|
-
|
3
|
-
|
2
|
+
class Category < ActiveRecord::Base
|
3
|
+
include Adminpanel::Base
|
4
|
+
validates_presence_of :model
|
4
5
|
|
5
|
-
|
6
|
+
has_many :categorizations
|
7
|
+
has_many :products, :through => :categorizations, :dependent => :destroy
|
6
8
|
|
7
|
-
has_many :categorizations
|
8
|
-
has_many :products, :through => :categorizations, :dependent => :destroy
|
9
9
|
|
10
|
+
def self.form_attributes
|
11
|
+
[
|
12
|
+
{"name" => {"type" => "text_field", "name" => "name", "label" => "name", "placeholder" => "name"}},
|
13
|
+
# {'model' => {"type" => "text_field", "name" => "name", "label" => "name", "placeholder" => "name", 'show' => 'false'}},
|
14
|
+
{"product_ids" => {"type" => "has_many", "model" => "Adminpanel::Product", "name" => "product_ids"}},
|
15
|
+
]
|
16
|
+
end
|
10
17
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
# {'model' => {"type" => "text_field", "name" => "name", "label" => "name", "placeholder" => "name", 'show' => 'false'}},
|
15
|
-
{"product_ids" => {"type" => "has_many", "model" => "Adminpanel::Product", "name" => "product_ids"}},
|
16
|
-
]
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.display_name
|
20
|
-
"Category"
|
21
|
-
end
|
18
|
+
def self.display_name
|
19
|
+
"Categoria"
|
20
|
+
end
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
end
|
22
|
+
def self.icon
|
23
|
+
"icon-truck"
|
26
24
|
end
|
25
|
+
end
|
27
26
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Adminpanel
|
2
|
+
class Mug < ActiveRecord::Base
|
3
|
+
include Adminpanel::Base
|
4
|
+
|
5
|
+
|
6
|
+
def self.form_attributes
|
7
|
+
[
|
8
|
+
{
|
9
|
+
'name' => {
|
10
|
+
'type' => 'text_field',
|
11
|
+
'label' => 'name',
|
12
|
+
'placeholder' => 'name'
|
13
|
+
}
|
14
|
+
},
|
15
|
+
{
|
16
|
+
'number' => {
|
17
|
+
'type' => 'number_field',
|
18
|
+
'label' => 'number',
|
19
|
+
'placeholder' => 'number'
|
20
|
+
}
|
21
|
+
},
|
22
|
+
]
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.display_name
|
26
|
+
'Taza' #singular
|
27
|
+
end
|
28
|
+
|
29
|
+
# def self.icon
|
30
|
+
# "truck" # fa-{icon}
|
31
|
+
# end
|
32
|
+
|
33
|
+
def self.routes_options
|
34
|
+
{ except:[:new, :create, :edit, :update, :destroy, :show], path:'tazas'}
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Adminpanel
|
2
2
|
class Product < ActiveRecord::Base
|
3
|
-
|
4
|
-
|
3
|
+
include Adminpanel::Base
|
4
|
+
|
5
5
|
has_many :categorizations
|
6
6
|
has_many :categories, :through => :categorizations
|
7
7
|
mount_images :photos
|
@@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
|
|
3
3
|
require 'rails/all'
|
4
4
|
|
5
5
|
Bundler.require(*Rails.groups)
|
6
|
-
require
|
6
|
+
require 'adminpanel'
|
7
7
|
|
8
8
|
module Dummy
|
9
9
|
class Application < Rails::Application
|
@@ -29,7 +29,7 @@ module Dummy
|
|
29
29
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
30
30
|
config.i18n.default_locale = :es
|
31
31
|
I18n.config.enforce_available_locales = true
|
32
|
-
|
32
|
+
|
33
33
|
# Configure the default encoding used in templates for Ruby 1.9.
|
34
34
|
config.encoding = "utf-8"
|
35
35
|
|
@@ -44,14 +44,6 @@ module Dummy
|
|
44
44
|
# like if you have constraints or database-specific column types
|
45
45
|
# config.active_record.schema_format = :sql
|
46
46
|
|
47
|
-
# Enforce whitelist mode for mass assignment.
|
48
|
-
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
49
|
-
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
50
|
-
# parameters by using an attr_accessible or attr_protected declaration.
|
51
|
-
if Rails::VERSION::MAJOR == 3
|
52
|
-
config.active_record.whitelist_attributes = true
|
53
|
-
end
|
54
|
-
|
55
47
|
# Enable the asset pipeline
|
56
48
|
config.assets.enabled = true
|
57
49
|
|
@@ -59,4 +51,3 @@ module Dummy
|
|
59
51
|
config.assets.version = '1.0'
|
60
52
|
end
|
61
53
|
end
|
62
|
-
|
@@ -1,41 +1,29 @@
|
|
1
1
|
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# In the development environment your application's code is reloaded on
|
5
5
|
# every request. This slows down response time but is perfect for development
|
6
6
|
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
|
-
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
10
11
|
|
11
|
-
# Show full error reports and disable caching
|
12
|
+
# Show full error reports and disable caching.
|
12
13
|
config.consider_all_requests_local = true
|
13
14
|
config.action_controller.perform_caching = false
|
14
15
|
|
15
|
-
# Don't care if the mailer can't send
|
16
|
+
# Don't care if the mailer can't send.
|
16
17
|
config.action_mailer.raise_delivery_errors = false
|
17
18
|
|
18
|
-
# Print deprecation notices to the Rails logger
|
19
|
+
# Print deprecation notices to the Rails logger.
|
19
20
|
config.active_support.deprecation = :log
|
20
21
|
|
21
|
-
if
|
22
|
-
|
23
|
-
config.whiny_nils = true
|
22
|
+
# Raise an error on page load if there are pending migrations
|
23
|
+
config.active_record.migration_error = :page_load
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
# Raise exception on mass assignment protection for Active Record models
|
29
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
30
|
-
|
31
|
-
# Log the query plan for queries taking more than this (works
|
32
|
-
# with SQLite, MySQL, and PostgreSQL)
|
33
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
34
|
-
|
35
|
-
# Do not compress assets
|
36
|
-
config.assets.compress = false
|
37
|
-
end
|
38
|
-
|
39
|
-
# Expands the lines which load the assets
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
40
28
|
config.assets.debug = true
|
41
29
|
end
|
@@ -1,72 +1,80 @@
|
|
1
1
|
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
|
-
# Code is not reloaded between requests
|
4
|
+
# Code is not reloaded between requests.
|
5
5
|
config.cache_classes = true
|
6
6
|
|
7
|
-
#
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both thread web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
8
14
|
config.consider_all_requests_local = false
|
9
15
|
config.action_controller.perform_caching = true
|
10
16
|
|
11
|
-
#
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
+
# config.action_dispatch.rack_cache = true
|
21
|
+
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
12
23
|
config.serve_static_assets = false
|
13
24
|
|
14
|
-
# Compress JavaScripts and CSS
|
15
|
-
config.assets.
|
25
|
+
# Compress JavaScripts and CSS.
|
26
|
+
config.assets.js_compressor = :uglifier
|
27
|
+
# config.assets.css_compressor = :sass
|
16
28
|
|
17
|
-
#
|
29
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
18
30
|
config.assets.compile = false
|
19
31
|
|
20
|
-
# Generate digests for assets URLs
|
32
|
+
# Generate digests for assets URLs.
|
21
33
|
config.assets.digest = true
|
22
34
|
|
23
|
-
if
|
24
|
-
|
25
|
-
config.assets.js_compressor = :uglifier
|
26
|
-
end
|
27
|
-
|
28
|
-
# Defaults to nil and saved in location specified by config.assets.prefix
|
29
|
-
# config.assets.manifest = YOUR_PATH
|
35
|
+
# Version of your assets, change this if you want to expire all your assets.
|
36
|
+
config.assets.version = '1.0'
|
30
37
|
|
31
|
-
# Specifies the header that your server uses for sending files
|
38
|
+
# Specifies the header that your server uses for sending files.
|
32
39
|
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
33
40
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
34
41
|
|
35
42
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
36
43
|
# config.force_ssl = true
|
37
44
|
|
38
|
-
#
|
39
|
-
|
45
|
+
# Set to :debug to see everything in the log.
|
46
|
+
config.log_level = :info
|
40
47
|
|
41
|
-
# Prepend all log lines with the following tags
|
48
|
+
# Prepend all log lines with the following tags.
|
42
49
|
# config.log_tags = [ :subdomain, :uuid ]
|
43
50
|
|
44
|
-
# Use a different logger for distributed setups
|
51
|
+
# Use a different logger for distributed setups.
|
45
52
|
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
46
53
|
|
47
|
-
# Use a different cache store in production
|
54
|
+
# Use a different cache store in production.
|
48
55
|
# config.cache_store = :mem_cache_store
|
49
56
|
|
50
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
57
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
51
58
|
# config.action_controller.asset_host = "http://assets.example.com"
|
52
59
|
|
53
|
-
# Precompile additional assets
|
60
|
+
# Precompile additional assets.
|
61
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
54
62
|
# config.assets.precompile += %w( search.js )
|
55
63
|
|
56
|
-
#
|
64
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
65
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
57
66
|
# config.action_mailer.raise_delivery_errors = false
|
58
67
|
|
59
|
-
# Enable threaded mode
|
60
|
-
# config.threadsafe!
|
61
|
-
|
62
68
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
63
|
-
# the I18n.default_locale when a translation can not be found)
|
69
|
+
# the I18n.default_locale when a translation can not be found).
|
64
70
|
config.i18n.fallbacks = true
|
65
71
|
|
66
|
-
# Send deprecation notices to registered listeners
|
72
|
+
# Send deprecation notices to registered listeners.
|
67
73
|
config.active_support.deprecation = :notify
|
68
74
|
|
69
|
-
#
|
70
|
-
#
|
71
|
-
|
75
|
+
# Disable automatic flushing of the log to improve performance.
|
76
|
+
# config.autoflush_log = false
|
77
|
+
|
78
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
79
|
+
config.log_formatter = ::Logger::Formatter.new
|
72
80
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# The test environment is used exclusively to run your application's
|
5
5
|
# test suite. You never need to work with it otherwise. Remember that
|
@@ -7,35 +7,30 @@ Dummy::Application.configure do
|
|
7
7
|
# and recreated between test runs. Don't rely on the data there!
|
8
8
|
config.cache_classes = true
|
9
9
|
|
10
|
-
#
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
if Rails::VERSION::MAJOR == 4
|
15
|
-
config.eager_load = true
|
16
|
-
else
|
17
|
-
# Log error messages when you accidentally call methods on nil
|
18
|
-
config.whiny_nils = true
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
19
14
|
|
20
|
-
|
21
|
-
|
22
|
-
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_assets = true
|
17
|
+
config.static_cache_control = "public, max-age=3600"
|
23
18
|
|
24
|
-
# Show full error reports and disable caching
|
19
|
+
# Show full error reports and disable caching.
|
25
20
|
config.consider_all_requests_local = true
|
26
21
|
config.action_controller.perform_caching = false
|
27
22
|
|
28
|
-
# Raise exceptions instead of rendering exception templates
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
29
24
|
config.action_dispatch.show_exceptions = false
|
30
25
|
|
31
|
-
# Disable request forgery protection in test environment
|
32
|
-
config.action_controller.allow_forgery_protection
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
33
28
|
|
34
29
|
# Tell Action Mailer not to deliver emails to the real world.
|
35
30
|
# The :test delivery method accumulates sent emails in the
|
36
31
|
# ActionMailer::Base.deliveries array.
|
37
32
|
config.action_mailer.delivery_method = :test
|
38
33
|
|
39
|
-
# Print deprecation notices to the stderr
|
34
|
+
# Print deprecation notices to the stderr.
|
40
35
|
config.active_support.deprecation = :stderr
|
41
36
|
end
|
File without changes
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,6 +10,72 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended to check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define
|
14
|
-
|
13
|
+
ActiveRecord::Schema.define do
|
14
|
+
create_table :adminpanel_users do |t|
|
15
|
+
t.string :name
|
16
|
+
t.string :email
|
17
|
+
t.string :password_digest
|
18
|
+
t.string :remember_token
|
19
|
+
t.integer :group_id
|
20
|
+
t.datetime :created_at, :null => false
|
21
|
+
t.datetime :updated_at, :null => false
|
22
|
+
end
|
23
|
+
create_table :adminpanel_galleries do |t|
|
24
|
+
t.string :file
|
25
|
+
t.integer :position
|
26
|
+
t.datetime :created_at, :null => false
|
27
|
+
t.datetime :updated_at, :null => false
|
28
|
+
end
|
29
|
+
create_table :adminpanel_images do |t|
|
30
|
+
t.string :file
|
31
|
+
t.string :section_id
|
32
|
+
t.datetime :created_at, :null => false
|
33
|
+
t.datetime :updated_at, :null => false
|
34
|
+
end
|
35
|
+
create_table :adminpanel_products do |t|
|
36
|
+
t.string :price
|
37
|
+
t.string :name
|
38
|
+
t.text :description
|
39
|
+
t.datetime :created_at, :null => false
|
40
|
+
t.datetime :updated_at, :null => false
|
41
|
+
end
|
42
|
+
create_table :adminpanel_photos do |t|
|
43
|
+
t.string :file
|
44
|
+
t.text :product_id
|
45
|
+
t.datetime :created_at, :null => false
|
46
|
+
t.datetime :updated_at, :null => false
|
47
|
+
end
|
48
|
+
create_table :adminpanel_categories do |t|
|
49
|
+
t.string :name
|
50
|
+
t.string :model
|
51
|
+
t.datetime :created_at, :null => false
|
52
|
+
t.datetime :updated_at, :null => false
|
53
|
+
end
|
54
|
+
create_table :adminpanel_categorizations do |t|
|
55
|
+
t.integer :product_id
|
56
|
+
t.integer :category_id
|
57
|
+
t.datetime :created_at, :null => false
|
58
|
+
t.datetime :updated_at, :null => false
|
59
|
+
end
|
60
|
+
create_table :adminpanel_groups do |t|
|
61
|
+
t.string :name
|
62
|
+
t.datetime :created_at, :null => false
|
63
|
+
t.datetime :updated_at, :null => false
|
64
|
+
end
|
65
|
+
create_table :adminpanel_mugs do |t|
|
66
|
+
t.string :name
|
67
|
+
t.integer :number
|
68
|
+
t.datetime :created_at, :null => false
|
69
|
+
t.datetime :updated_at, :null => false
|
70
|
+
end
|
71
|
+
create_table :adminpanel_sections do |t|
|
72
|
+
t.string :name
|
73
|
+
t.text :description
|
74
|
+
t.string :key
|
75
|
+
t.boolean :has_image
|
76
|
+
t.string :page
|
77
|
+
t.datetime :created_at, :null => false
|
78
|
+
t.datetime :updated_at, :null => false
|
79
|
+
t.boolean :has_description
|
80
|
+
end
|
15
81
|
end
|