loldesign_publisher 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +21 -0
- data/app/assets/images/grid.png +0 -0
- data/app/assets/images/loldesign_publisher/logo.png +0 -0
- data/app/assets/images/loldesign_publisher/logo.svg +81 -0
- data/app/assets/images/loldesign_publisher/nav_active_link.svg +8 -0
- data/app/assets/javascripts/loldesign_publisher/activable.js +51 -0
- data/app/assets/javascripts/loldesign_publisher/libs/datepicker-pt-BR.js +37 -0
- data/app/assets/javascripts/loldesign_publisher/libs/gumby.init.js +47 -0
- data/app/assets/javascripts/loldesign_publisher/libs/gumby.js +258 -0
- data/app/assets/javascripts/loldesign_publisher/libs/gumby.min.js +1 -0
- data/app/assets/javascripts/loldesign_publisher/libs/jquery-1.10.1.min.js +6 -0
- data/app/assets/javascripts/loldesign_publisher/libs/jquery-1.10.1.min.map +1 -0
- data/app/assets/javascripts/loldesign_publisher/libs/jquery-2.0.2.min.js +6 -0
- data/app/assets/javascripts/loldesign_publisher/libs/jquery-2.0.2.min.map +1 -0
- data/app/assets/javascripts/loldesign_publisher/libs/jquery.mask.min.js +7 -0
- data/app/assets/javascripts/loldesign_publisher/libs/jquery.mobile.custom.min.js +3 -0
- data/app/assets/javascripts/loldesign_publisher/libs/modernizr-2.6.2.min.js +4 -0
- data/app/assets/javascripts/loldesign_publisher/libs/ui/gumby.checkbox.js +101 -0
- data/app/assets/javascripts/loldesign_publisher/libs/ui/gumby.fixed.js +240 -0
- data/app/assets/javascripts/loldesign_publisher/libs/ui/gumby.navbar.js +115 -0
- data/app/assets/javascripts/loldesign_publisher/libs/ui/gumby.radiobtn.js +90 -0
- data/app/assets/javascripts/loldesign_publisher/libs/ui/gumby.retina.js +81 -0
- data/app/assets/javascripts/loldesign_publisher/libs/ui/gumby.skiplink.js +157 -0
- data/app/assets/javascripts/loldesign_publisher/libs/ui/gumby.tabs.js +80 -0
- data/app/assets/javascripts/loldesign_publisher/libs/ui/gumby.toggleswitch.js +264 -0
- data/app/assets/javascripts/loldesign_publisher/libs/ui/jquery.validation.js +142 -0
- data/app/assets/javascripts/loldesign_publisher/main.js +23 -0
- data/app/assets/javascripts/loldesign_publisher/plugins.js +4 -0
- data/app/assets/javascripts/loldesign_publisher/publisher.js +65 -0
- data/app/assets/stylesheets/loldesign_publisher/_base.css.scss +62 -0
- data/app/assets/stylesheets/loldesign_publisher/gumby.css +1683 -0
- data/app/assets/stylesheets/loldesign_publisher/layouts/_default.html.css.scss +15 -0
- data/app/assets/stylesheets/loldesign_publisher/layouts/_form.css.scss +101 -0
- data/app/assets/stylesheets/loldesign_publisher/layouts/_header_main.css.scss +20 -0
- data/app/assets/stylesheets/loldesign_publisher/layouts/_nav_main.css.scss +30 -0
- data/app/assets/stylesheets/loldesign_publisher/layouts/_resource_info.css.scss +40 -0
- data/app/assets/stylesheets/loldesign_publisher/modules/_add_resource.css.scss +12 -0
- data/app/assets/stylesheets/loldesign_publisher/modules/_btn_cancel.css.scss +13 -0
- data/app/assets/stylesheets/loldesign_publisher/modules/_btn_remove.css.scss +13 -0
- data/app/assets/stylesheets/loldesign_publisher/modules/_btn_save.css.scss +16 -0
- data/app/assets/stylesheets/loldesign_publisher/modules/_btn_show.css.scss +12 -0
- data/app/assets/stylesheets/loldesign_publisher/modules/_filter_box.css.scss +35 -0
- data/app/assets/stylesheets/loldesign_publisher/modules/_messages.css.scss +20 -0
- data/app/assets/stylesheets/loldesign_publisher/modules/_pagination.css.scss +65 -0
- data/app/assets/stylesheets/loldesign_publisher/modules/_table_page.css.scss +37 -0
- data/app/assets/stylesheets/loldesign_publisher/modules/_title_page.css.scss +54 -0
- data/app/assets/stylesheets/loldesign_publisher/publisher.css +7 -0
- data/app/controllers/loldesign_publisher/activables_controller.rb +26 -0
- data/app/controllers/loldesign_publisher/publisher_controller.rb +4 -0
- data/app/helpers/loldesign_publisher/publisher_helper.rb +101 -0
- data/app/views/layouts/loldesign_publisher/_header_main.html.erb +8 -0
- data/app/views/layouts/loldesign_publisher/_nav_main.html.erb +12 -0
- data/app/views/layouts/loldesign_publisher/modules/_add_resource.html.erb +3 -0
- data/app/views/layouts/loldesign_publisher/modules/_messages.html.erb +5 -0
- data/app/views/layouts/loldesign_publisher/modules/_td_not_found.html.erb +1 -0
- data/app/views/layouts/loldesign_publisher/modules/_title_page.html.erb +9 -0
- data/app/views/layouts/loldesign_publisher/publisher.html.erb +24 -0
- data/config/routes.rb +7 -0
- data/lib/generators/loldesign_publisher/install_generator.rb +26 -0
- data/lib/generators/loldesign_publisher/templates/loldesign_publisher.yml +12 -0
- data/lib/generators/loldesign_publisher/templates/override_publisher.css.scss +5 -0
- data/lib/generators/loldesign_publisher/templates/publisher_rails_app.js +3 -0
- data/lib/generators/loldesign_publisher/views_generator.rb +16 -0
- data/lib/loldesign_publisher.rb +28 -0
- data/lib/loldesign_publisher/engine.rb +28 -0
- data/lib/loldesign_publisher/version.rb +3 -0
- data/lib/tasks/loldesign_publisher_tasks.rake +4 -0
- data/public/fonts/icons/entypo.eot +0 -0
- data/public/fonts/icons/entypo.ttf +0 -0
- data/public/fonts/icons/entypo.woff +0 -0
- data/public/grid.js +68 -0
- data/spec/controllers/loldesign_publisher/activables_controller_spec.rb +21 -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/javascripts/loldesign_publisher/publisher_rails_app.js +3 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/assets/stylesheets/loldesign_publisher/override_publisher.css.scss +5 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/users_controller.rb +10 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/user.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/users/_filters_by_from_to.html.erb +8 -0
- data/spec/dummy/app/views/users/_user.html.erb +9 -0
- data/spec/dummy/app/views/users/index.html.erb +26 -0
- data/spec/dummy/app/views/users/new.html.erb +23 -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 +29 -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 +78 -0
- data/spec/dummy/config/environments/test.rb +39 -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/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/simple_form.rb +145 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/locales/simple_form.en.yml +26 -0
- data/spec/dummy/config/loldesign_publisher.yml +12 -0
- data/spec/dummy/config/routes.rb +59 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20141126120426_create_users.rb +13 -0
- data/spec/dummy/db/schema.rb +26 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/spec/dummy/log/development.log +16 -0
- data/spec/dummy/log/test.log +158 -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/factories/user_factory.rb +10 -0
- data/spec/spec_helper.rb +18 -0
- metadata +383 -0
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = '1.0'
|
5
|
+
|
6
|
+
# Precompile additional assets.
|
7
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
8
|
+
# Rails.application.config.assets.precompile += %w( loldesign_publisher.css loldesign_publisher.js )
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,145 @@
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
2
|
+
SimpleForm.setup do |config|
|
3
|
+
# Wrappers are used by the form builder to generate a
|
4
|
+
# complete input. You can remove any component from the
|
5
|
+
# wrapper, change the order or even add your own to the
|
6
|
+
# stack. The options given below are used to wrap the
|
7
|
+
# whole input.
|
8
|
+
config.wrappers :default, class: :input,
|
9
|
+
hint_class: :field_with_hint, error_class: :field_with_errors do |b|
|
10
|
+
## Extensions enabled by default
|
11
|
+
# Any of these extensions can be disabled for a
|
12
|
+
# given input by passing: `f.input EXTENSION_NAME => false`.
|
13
|
+
# You can make any of these extensions optional by
|
14
|
+
# renaming `b.use` to `b.optional`.
|
15
|
+
|
16
|
+
# Determines whether to use HTML5 (:email, :url, ...)
|
17
|
+
# and required attributes
|
18
|
+
b.use :html5
|
19
|
+
|
20
|
+
# Calculates placeholders automatically from I18n
|
21
|
+
# You can also pass a string as f.input placeholder: "Placeholder"
|
22
|
+
b.use :placeholder
|
23
|
+
|
24
|
+
## Optional extensions
|
25
|
+
# They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
|
26
|
+
# to the input. If so, they will retrieve the values from the model
|
27
|
+
# if any exists. If you want to enable the lookup for any of those
|
28
|
+
# extensions by default, you can change `b.optional` to `b.use`.
|
29
|
+
|
30
|
+
# Calculates maxlength from length validations for string inputs
|
31
|
+
b.optional :maxlength
|
32
|
+
|
33
|
+
# Calculates pattern from format validations for string inputs
|
34
|
+
b.optional :pattern
|
35
|
+
|
36
|
+
# Calculates min and max from length validations for numeric inputs
|
37
|
+
b.optional :min_max
|
38
|
+
|
39
|
+
# Calculates readonly automatically from readonly attributes
|
40
|
+
b.optional :readonly
|
41
|
+
|
42
|
+
## Inputs
|
43
|
+
b.use :label_input
|
44
|
+
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
45
|
+
b.use :error, wrap_with: { tag: :span, class: :error }
|
46
|
+
end
|
47
|
+
|
48
|
+
# The default wrapper to be used by the FormBuilder.
|
49
|
+
config.default_wrapper = :default
|
50
|
+
|
51
|
+
# Define the way to render check boxes / radio buttons with labels.
|
52
|
+
# Defaults to :nested for bootstrap config.
|
53
|
+
# inline: input + label
|
54
|
+
# nested: label > input
|
55
|
+
config.boolean_style = :nested
|
56
|
+
|
57
|
+
# Default class for buttons
|
58
|
+
config.button_class = 'btn'
|
59
|
+
|
60
|
+
# Method used to tidy up errors. Specify any Rails Array method.
|
61
|
+
# :first lists the first message for each field.
|
62
|
+
# Use :to_sentence to list all errors for each field.
|
63
|
+
# config.error_method = :first
|
64
|
+
|
65
|
+
# Default tag used for error notification helper.
|
66
|
+
config.error_notification_tag = :div
|
67
|
+
|
68
|
+
# CSS class to add for error notification helper.
|
69
|
+
config.error_notification_class = 'alert alert-error'
|
70
|
+
|
71
|
+
# ID to add for error notification helper.
|
72
|
+
# config.error_notification_id = nil
|
73
|
+
|
74
|
+
# Series of attempts to detect a default label method for collection.
|
75
|
+
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
76
|
+
|
77
|
+
# Series of attempts to detect a default value method for collection.
|
78
|
+
# config.collection_value_methods = [ :id, :to_s ]
|
79
|
+
|
80
|
+
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
81
|
+
# config.collection_wrapper_tag = nil
|
82
|
+
|
83
|
+
# You can define the class to use on all collection wrappers. Defaulting to none.
|
84
|
+
# config.collection_wrapper_class = nil
|
85
|
+
|
86
|
+
# You can wrap each item in a collection of radio/check boxes with a tag,
|
87
|
+
# defaulting to :span. Please note that when using :boolean_style = :nested,
|
88
|
+
# SimpleForm will force this option to be a label.
|
89
|
+
# config.item_wrapper_tag = :span
|
90
|
+
|
91
|
+
# You can define a class to use in all item wrappers. Defaulting to none.
|
92
|
+
# config.item_wrapper_class = nil
|
93
|
+
|
94
|
+
# How the label text should be generated altogether with the required text.
|
95
|
+
# config.label_text = lambda { |label, required| "#{required} #{label}" }
|
96
|
+
|
97
|
+
# You can define the class to use on all labels. Default is nil.
|
98
|
+
config.label_class = 'control-label'
|
99
|
+
|
100
|
+
# You can define the class to use on all forms. Default is simple_form.
|
101
|
+
# config.form_class = :simple_form
|
102
|
+
|
103
|
+
# You can define which elements should obtain additional classes
|
104
|
+
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
105
|
+
|
106
|
+
# Whether attributes are required by default (or not). Default is true.
|
107
|
+
# config.required_by_default = true
|
108
|
+
|
109
|
+
# Tell browsers whether to use the native HTML5 validations (novalidate form option).
|
110
|
+
# These validations are enabled in SimpleForm's internal config but disabled by default
|
111
|
+
# in this configuration, which is recommended due to some quirks from different browsers.
|
112
|
+
# To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
|
113
|
+
# change this configuration to true.
|
114
|
+
config.browser_validations = false
|
115
|
+
|
116
|
+
# Collection of methods to detect if a file type was given.
|
117
|
+
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
118
|
+
|
119
|
+
# Custom mappings for input types. This should be a hash containing a regexp
|
120
|
+
# to match as key, and the input type that will be used when the field name
|
121
|
+
# matches the regexp as value.
|
122
|
+
# config.input_mappings = { /count/ => :integer }
|
123
|
+
|
124
|
+
# Custom wrappers for input types. This should be a hash containing an input
|
125
|
+
# type as key and the wrapper that will be used for all inputs with specified type.
|
126
|
+
# config.wrapper_mappings = { string: :prepend }
|
127
|
+
|
128
|
+
# Default priority for time_zone inputs.
|
129
|
+
# config.time_zone_priority = nil
|
130
|
+
|
131
|
+
# Default priority for country inputs.
|
132
|
+
# config.country_priority = nil
|
133
|
+
|
134
|
+
# When false, do not use translations for labels.
|
135
|
+
# config.translate_labels = true
|
136
|
+
|
137
|
+
# Automatically discover new inputs in Rails' autoload path.
|
138
|
+
# config.inputs_discovery = true
|
139
|
+
|
140
|
+
# Cache SimpleForm inputs discovery
|
141
|
+
# config.cache_discovery = !Rails.env.development?
|
142
|
+
|
143
|
+
# Default class for inputs
|
144
|
+
# config.input_class = nil
|
145
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
en:
|
2
|
+
simple_form:
|
3
|
+
"yes": 'Yes'
|
4
|
+
"no": 'No'
|
5
|
+
required:
|
6
|
+
text: 'required'
|
7
|
+
mark: '*'
|
8
|
+
# You can uncomment the line below if you need to overwrite the whole required html.
|
9
|
+
# When using html, text and mark won't be used.
|
10
|
+
# html: '<abbr title="required">*</abbr>'
|
11
|
+
error_notification:
|
12
|
+
default_message: "Please review the problems below:"
|
13
|
+
# Labels and hints examples
|
14
|
+
# labels:
|
15
|
+
# defaults:
|
16
|
+
# password: 'Password'
|
17
|
+
# user:
|
18
|
+
# new:
|
19
|
+
# email: 'E-mail to sign in.'
|
20
|
+
# edit:
|
21
|
+
# email: 'E-mail.'
|
22
|
+
# hints:
|
23
|
+
# defaults:
|
24
|
+
# username: 'User name to sign in.'
|
25
|
+
# password: 'No special characters, please.'
|
26
|
+
|
@@ -0,0 +1,59 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
mount LoldesignPublisher::Rails::Engine => '/'
|
3
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
4
|
+
# See how all your routes lay out with "rake routes".
|
5
|
+
|
6
|
+
# You can have the root of your site routed with "root"
|
7
|
+
root 'users#index'
|
8
|
+
|
9
|
+
resources :users
|
10
|
+
|
11
|
+
# Example of regular route:
|
12
|
+
# get 'products/:id' => 'catalog#view'
|
13
|
+
|
14
|
+
# Example of named route that can be invoked with purchase_url(id: product.id)
|
15
|
+
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
16
|
+
|
17
|
+
# Example resource route (maps HTTP verbs to controller actions automatically):
|
18
|
+
# resources :products
|
19
|
+
|
20
|
+
# Example resource route with options:
|
21
|
+
# resources :products do
|
22
|
+
# member do
|
23
|
+
# get 'short'
|
24
|
+
# post 'toggle'
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
# collection do
|
28
|
+
# get 'sold'
|
29
|
+
# end
|
30
|
+
# end
|
31
|
+
|
32
|
+
# Example resource route with sub-resources:
|
33
|
+
# resources :products do
|
34
|
+
# resources :comments, :sales
|
35
|
+
# resource :seller
|
36
|
+
# end
|
37
|
+
|
38
|
+
# Example resource route with more complex sub-resources:
|
39
|
+
# resources :products do
|
40
|
+
# resources :comments
|
41
|
+
# resources :sales do
|
42
|
+
# get 'recent', on: :collection
|
43
|
+
# end
|
44
|
+
# end
|
45
|
+
|
46
|
+
# Example resource route with concerns:
|
47
|
+
# concern :toggleable do
|
48
|
+
# post 'toggle'
|
49
|
+
# end
|
50
|
+
# resources :posts, concerns: :toggleable
|
51
|
+
# resources :photos, concerns: :toggleable
|
52
|
+
|
53
|
+
# Example resource route within a namespace:
|
54
|
+
# namespace :admin do
|
55
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
56
|
+
# # (app/controllers/admin/products_controller.rb)
|
57
|
+
# resources :products
|
58
|
+
# end
|
59
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: 386c8ec81d1f8f65ee42d59bf9c175e0a4fef3ba0c538289cc2b301390da947f989e03f3b98a8bd9ab1de10d8cf0c59cabfd9e832a4adffa6c474c06fd6f2ef6
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: 7419cafff5c1ab905106f56e3fea3d7b4b514391d296087c7dbb0d7a31c71f1cf718c7f23cbff32a768dbbb1d6cf0f87387aa28940161caa7e287be2348fb3d8
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
Binary file
|
@@ -0,0 +1,26 @@
|
|
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: 20141126120426) do
|
15
|
+
|
16
|
+
create_table "users", force: true do |t|
|
17
|
+
t.string "name"
|
18
|
+
t.string "email"
|
19
|
+
t.string "password"
|
20
|
+
t.text "description"
|
21
|
+
t.boolean "active"
|
22
|
+
t.datetime "created_at"
|
23
|
+
t.datetime "updated_at"
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
Binary file
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
|
2
|
+
<%%= f.error_notification %>
|
3
|
+
|
4
|
+
<div class="form-inputs">
|
5
|
+
<%- attributes.each do |attribute| -%>
|
6
|
+
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
|
7
|
+
<%- end -%>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div class="form-actions">
|
11
|
+
<%%= f.button :submit %>
|
12
|
+
</div>
|
13
|
+
<%% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
2
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
+
Migrating to CreateUsers (20141126120426)
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "password" varchar(255), "description" text, "active" boolean, "created_at" datetime, "updated_at" datetime)
|
8
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20141126120426"]]
|
9
|
+
[1m[35m (0.9ms)[0m commit transaction
|
10
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
11
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "password" varchar(255), "description" text, "active" boolean, "created_at" datetime, "updated_at" datetime) [0m
|
12
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
13
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
14
|
+
[1m[35m (1.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
15
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
16
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20141126120426')
|