draw_erd 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/.travis.yml +3 -0
  4. data/Gemfile +9 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +31 -0
  7. data/Rakefile +19 -0
  8. data/app/assets/images/draw_erd/.keep +0 -0
  9. data/app/assets/javascripts/draw_erd/application.js +13 -0
  10. data/app/assets/javascripts/draw_erd/base.js +11 -0
  11. data/app/assets/stylesheets/draw_erd/application.css +15 -0
  12. data/app/assets/stylesheets/draw_erd/base.css +41 -0
  13. data/app/controllers/.keep +0 -0
  14. data/app/controllers/draw_erd/application_controller.rb +4 -0
  15. data/app/controllers/draw_erd/diagram_controller.rb +17 -0
  16. data/app/helpers/.keep +0 -0
  17. data/app/helpers/draw_erd/application_helper.rb +4 -0
  18. data/app/mailers/.keep +0 -0
  19. data/app/models/draw_erd/diagram.rb +35 -0
  20. data/app/views/.keep +0 -0
  21. data/app/views/draw_erd/diagram/index.html.erb +36 -0
  22. data/app/views/layouts/draw_erd/application.html.erb +14 -0
  23. data/config/routes.rb +3 -0
  24. data/draw_erd.gemspec +26 -0
  25. data/lib/draw_erd/engine.rb +5 -0
  26. data/lib/draw_erd/version.rb +3 -0
  27. data/lib/draw_erd.rb +2 -0
  28. data/spec/dummy/README.rdoc +28 -0
  29. data/spec/dummy/Rakefile +6 -0
  30. data/spec/dummy/app/assets/images/.keep +0 -0
  31. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  32. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  33. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  34. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  35. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  36. data/spec/dummy/app/mailers/.keep +0 -0
  37. data/spec/dummy/app/models/.keep +0 -0
  38. data/spec/dummy/app/models/concerns/.keep +0 -0
  39. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  40. data/spec/dummy/bin/bundle +3 -0
  41. data/spec/dummy/bin/rails +4 -0
  42. data/spec/dummy/bin/rake +4 -0
  43. data/spec/dummy/config/application.rb +23 -0
  44. data/spec/dummy/config/boot.rb +5 -0
  45. data/spec/dummy/config/database.yml +25 -0
  46. data/spec/dummy/config/environment.rb +5 -0
  47. data/spec/dummy/config/environments/development.rb +37 -0
  48. data/spec/dummy/config/environments/production.rb +82 -0
  49. data/spec/dummy/config/environments/test.rb +39 -0
  50. data/spec/dummy/config/initializers/assets.rb +8 -0
  51. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  52. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  53. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  54. data/spec/dummy/config/initializers/inflections.rb +16 -0
  55. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  56. data/spec/dummy/config/initializers/session_store.rb +3 -0
  57. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  58. data/spec/dummy/config/locales/en.yml +23 -0
  59. data/spec/dummy/config/routes.rb +56 -0
  60. data/spec/dummy/config/secrets.yml +22 -0
  61. data/spec/dummy/config.ru +4 -0
  62. data/spec/dummy/lib/assets/.keep +0 -0
  63. data/spec/dummy/log/.keep +0 -0
  64. data/spec/dummy/public/404.html +67 -0
  65. data/spec/dummy/public/422.html +67 -0
  66. data/spec/dummy/public/500.html +66 -0
  67. data/spec/dummy/public/favicon.ico +0 -0
  68. data/spec/fixtures/user.rb +8 -0
  69. data/spec/lib/version_spec.rb +9 -0
  70. data/spec/models/diagram_spec.rb +9 -0
  71. data/spec/spec_helper.rb +6 -0
  72. metadata +214 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5e27dc89a22b90611d8efe88784182f5229ec950
4
+ data.tar.gz: e377c9c4490311c3756c6faabc0037073d1f33b5
5
+ SHA512:
6
+ metadata.gz: 6e7e6a5916cc54f90e216b6b38decc5ec761d13fa140d157b52b7defd7264397e97d501d9cdfc5e9674312c2744279df40ec056042fa61913712c07db95be7d9
7
+ data.tar.gz: d3d8b782b676d9f760c4cf5960f15364954014679e2f9c7a2302b65a40b4356cf0ad0502e942df3f1fd9aeae818a2b676e09cb532adeb16aac18b58ae4601772
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ .bundle
2
+ Gemfile.lock
3
+ pkg
4
+ tmp
5
+ spec/dummy/db/*.sqlite3
6
+ spec/dummy/db/*.sqlite3-journal
7
+ spec/dummy/log/*.log
8
+ spec/dummy/tmp
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in draw_erd.gemspec
4
+ gemspec
5
+
6
+ group :test do
7
+ gem 'rspec'
8
+ gem 'sqlite3'
9
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 ogom
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Draw ERD
2
+
3
+ [![Build Status](https://travis-ci.org/ogom/draw_erd.png?branch=master)](https://travis-ci.org/ogom/draw_erd)
4
+
5
+ Drawing the Entity-Relationship Diagram of Rails.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```
12
+ gem 'draw_erd'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ ```
18
+ $ bundle
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ Add this line to your config/routes.rb:
24
+
25
+ ```
26
+ mount DrawErd::Engine, at: '/rails/info/schemas'
27
+ ```
28
+
29
+ ## License
30
+
31
+ * MIT
data/Rakefile ADDED
@@ -0,0 +1,19 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
8
+ load 'rails/tasks/engine.rake'
9
+
10
+ require 'bundler/gem_tasks'
11
+ Bundler::GemHelper.install_tasks
12
+
13
+ require 'rspec/core/rake_task'
14
+ RSpec::Core::RakeTask.new(:spec) do |task|
15
+ task.rspec_opts = ['--color', '--format', 'doc']
16
+ end
17
+
18
+ task test: :spec
19
+ task default: :spec
File without changes
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,11 @@
1
+ function check_schema() {
2
+ var schemas = [];
3
+
4
+ for (var i = 0, n = document.form_schema.length; i < n; i++) {
5
+ if (document.form_schema.elements[i].checked) {
6
+ schemas.push(document.form_schema.elements[i].name);
7
+ }
8
+ }
9
+
10
+ location.href = document.form_schema.action + '?' + schemas.join('&');
11
+ }
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,41 @@
1
+ body { background-color: #fff; color: #333; }
2
+
3
+ body, p, ol, ul, td {
4
+ font-family: helvetica, verdana, arial, sans-serif;
5
+ font-size: 13px;
6
+ line-height: 18px;
7
+ }
8
+
9
+ pre {
10
+ background-color: #eee;
11
+ padding: 10px;
12
+ font-size: 11px;
13
+ white-space: pre-wrap;
14
+ }
15
+
16
+ h2 { padding-left: 10px; }
17
+
18
+ #schema_table {
19
+ border-collapse: collapse;
20
+ }
21
+
22
+ #schema_table td {
23
+ padding: 0 30px;
24
+ }
25
+
26
+ #schema_table tr.bottom th {
27
+ padding-bottom: 10px;
28
+ line-height: 15px;
29
+ }
30
+
31
+ input.bottom {
32
+ font-size: 15px;
33
+ font-weight: bold;
34
+ border:none;
35
+ background:transparent;
36
+ }
37
+
38
+ div.schemas {
39
+ padding-top: 18px;
40
+ float:left;
41
+ }
File without changes
@@ -0,0 +1,4 @@
1
+ module DrawErd
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,17 @@
1
+ module DrawErd
2
+ class DiagramController < ::DrawErd::ApplicationController
3
+ def index
4
+ title = 'erd'
5
+ path = 'draw-erd'
6
+ @image_file = File.join(path, "#{title}.png")
7
+
8
+ @domains = []
9
+ @domains = params['schemas'].keys if params.key?('schemas')
10
+
11
+ diagram = DrawErd::Diagram.new(File.join('public', 'images', path))
12
+ diagram.create(title, @domains)
13
+
14
+ @schemas = DrawErd::Diagram.schemas
15
+ end
16
+ end
17
+ end
data/app/helpers/.keep ADDED
File without changes
@@ -0,0 +1,4 @@
1
+ module DrawErd
2
+ module ApplicationHelper
3
+ end
4
+ end
data/app/mailers/.keep ADDED
File without changes
@@ -0,0 +1,35 @@
1
+ require 'rails_erd/diagram/graphviz'
2
+
3
+ module DrawErd
4
+ class Diagram
5
+ class << self
6
+ def schemas
7
+ schemas = ActiveRecord::Base.connection.tables
8
+ schemas.delete('schema_migrations')
9
+ schemas.map! {|schema| schema.singularize.camelize}
10
+ schemas.sort
11
+ end
12
+ end
13
+
14
+ def initialize(path)
15
+ @path = File.expand_path(path, Rails.root)
16
+ FileUtils.mkdir_p(@path)
17
+ end
18
+
19
+ def create(title, domains=[])
20
+ only = domains.map {|domain| domain.to_sym}
21
+ options = {
22
+ filetype: :png,
23
+ attributes: [:foreign_keys, :primary_keys, :content],
24
+ title: title.to_s,
25
+ only: only,
26
+ filename: File.join(@path, title.to_s)
27
+ }
28
+
29
+ Rails.application.eager_load!
30
+ RailsERD::Diagram::Graphviz.create(options)
31
+ rescue => e
32
+ Rails.logger.error(e)
33
+ end
34
+ end
35
+ end
data/app/views/.keep ADDED
File without changes
@@ -0,0 +1,36 @@
1
+ <h2>Schemas</h2>
2
+ <p>Drawing the Entity-Relationship Diagram</p>
3
+
4
+ <div class='schemas'>
5
+ <%= form_tag({}, method: :get, name: 'form_schema') do %>
6
+ <table id='schema_table' class='schema_table'>
7
+ <thead>
8
+ <tr>
9
+ <th>Schema</th>
10
+ </tr>
11
+ <tr class='bottom'>
12
+ <th>
13
+ <%= submit_tag :draw, class: 'bottom' %>
14
+ </th>
15
+ </tr>
16
+ </thead>
17
+ <tbody>
18
+ <% @schemas.each do |schema| %>
19
+ <tr>
20
+ <td>
21
+ <%= check_box :schemas, schema,
22
+ {checked: @domains.include?(schema), onclick: 'check_schema()'}, true, false %>
23
+ <%= schema %>
24
+ </td>
25
+ </tr>
26
+ <% end %>
27
+ </tbody>
28
+ </table>
29
+ <% end %>
30
+ </div>
31
+
32
+ <div class='draw'>
33
+ <% if @domains.present? %>
34
+ <%= image_tag(@image_file) %>
35
+ <% end %>
36
+ </div>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Schemas</title>
5
+ <%= stylesheet_link_tag "draw_erd/application", media: "all" %>
6
+ <%= javascript_include_tag "draw_erd/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
data/config/routes.rb ADDED
@@ -0,0 +1,3 @@
1
+ DrawErd::Engine.routes.draw do
2
+ root 'diagram#index'
3
+ end
data/draw_erd.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'draw_erd/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "draw_erd"
8
+ spec.version = DrawErd::VERSION
9
+ spec.authors = ["ogom"]
10
+ spec.email = ["ogom@hotmail.co.jp"]
11
+ spec.summary = %q{Drawing the Entity-Relationship Diagram.}
12
+ spec.description = %q{Drawing the Entity-Relationship Diagram of Rails.}
13
+ spec.homepage = "https://github.com/ogom/draw_erd"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency 'rails'
22
+ spec.add_dependency 'rails-erd'
23
+
24
+ spec.add_development_dependency 'bundler'
25
+ spec.add_development_dependency 'rake'
26
+ end
@@ -0,0 +1,5 @@
1
+ module DrawErd
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace DrawErd
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module DrawErd
2
+ VERSION = '0.0.1'.freeze
3
+ end
data/lib/draw_erd.rb ADDED
@@ -0,0 +1,2 @@
1
+ require 'draw_erd/version'
2
+ require 'draw_erd/engine'
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Rails.application.load_tasks
File without changes
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
File without changes
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
File without changes
File without changes
File without changes
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,23 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require "draw_erd"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
+ # config.time_zone = 'Central Time (US & Canada)'
17
+
18
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
+ # config.i18n.default_locale = :de
21
+ end
22
+ end
23
+
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: db/test.sqlite3
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,37 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
+
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.
28
+ config.assets.debug = true
29
+
30
+ # Adds additional error checking when serving assets at runtime.
31
+ # Checks for improperly declared sprockets dependencies.
32
+ # Raises helpful error messages.
33
+ config.assets.raise_runtime_errors = true
34
+
35
+ # Raises error for missing translations
36
+ # config.action_view.raise_on_missing_translations = true
37
+ end