attr_initializable 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. data/README.md +4 -0
  2. data/Rakefile +0 -8
  3. data/lib/attr_initializable.rb +4 -3
  4. data/lib/attr_initializable/version.rb +1 -1
  5. data/test/attr_initializable_test.rb +27 -0
  6. data/test/test_helper.rb +4 -18
  7. data/test/test_utils.rb +11 -16
  8. metadata +11 -147
  9. data/test/dummy-rails3/Rakefile +0 -7
  10. data/test/dummy-rails3/app/assets/javascripts/application.js +0 -15
  11. data/test/dummy-rails3/app/assets/stylesheets/application.css +0 -13
  12. data/test/dummy-rails3/app/controllers/application_controller.rb +0 -3
  13. data/test/dummy-rails3/app/helpers/application_helper.rb +0 -2
  14. data/test/dummy-rails3/app/models/manufacturer.rb +0 -3
  15. data/test/dummy-rails3/app/models/widget.rb +0 -7
  16. data/test/dummy-rails3/app/views/layouts/application.html.erb +0 -14
  17. data/test/dummy-rails3/config.ru +0 -4
  18. data/test/dummy-rails3/config/application.rb +0 -59
  19. data/test/dummy-rails3/config/boot.rb +0 -10
  20. data/test/dummy-rails3/config/database.yml +0 -10
  21. data/test/dummy-rails3/config/environment.rb +0 -5
  22. data/test/dummy-rails3/config/environments/development.rb +0 -37
  23. data/test/dummy-rails3/config/environments/production.rb +0 -67
  24. data/test/dummy-rails3/config/environments/test.rb +0 -37
  25. data/test/dummy-rails3/config/initializers/backtrace_silencers.rb +0 -7
  26. data/test/dummy-rails3/config/initializers/inflections.rb +0 -15
  27. data/test/dummy-rails3/config/initializers/mime_types.rb +0 -5
  28. data/test/dummy-rails3/config/initializers/secret_token.rb +0 -7
  29. data/test/dummy-rails3/config/initializers/session_store.rb +0 -8
  30. data/test/dummy-rails3/config/initializers/wrap_parameters.rb +0 -14
  31. data/test/dummy-rails3/config/locales/en.yml +0 -5
  32. data/test/dummy-rails3/config/routes.rb +0 -58
  33. data/test/dummy-rails3/db/migrate/20131027192625_create_manufacturers.rb +0 -9
  34. data/test/dummy-rails3/db/migrate/20131027192834_create_widgets.rb +0 -11
  35. data/test/dummy-rails3/db/schema.rb +0 -28
  36. data/test/dummy-rails3/db/test.sqlite3 +0 -0
  37. data/test/dummy-rails3/log/test.log +0 -1169
  38. data/test/dummy-rails3/public/404.html +0 -26
  39. data/test/dummy-rails3/public/422.html +0 -26
  40. data/test/dummy-rails3/public/500.html +0 -25
  41. data/test/dummy-rails3/public/favicon.ico +0 -0
  42. data/test/dummy-rails3/script/rails +0 -6
  43. data/test/dummy-rails4/Rakefile +0 -6
  44. data/test/dummy-rails4/app/assets/javascripts/application.js +0 -16
  45. data/test/dummy-rails4/app/assets/stylesheets/application.css +0 -13
  46. data/test/dummy-rails4/app/controllers/application_controller.rb +0 -5
  47. data/test/dummy-rails4/app/helpers/application_helper.rb +0 -2
  48. data/test/dummy-rails4/app/models/manufacturer.rb +0 -3
  49. data/test/dummy-rails4/app/models/widget.rb +0 -7
  50. data/test/dummy-rails4/app/views/layouts/application.html.erb +0 -14
  51. data/test/dummy-rails4/bin/bundle +0 -3
  52. data/test/dummy-rails4/bin/rails +0 -4
  53. data/test/dummy-rails4/bin/rake +0 -4
  54. data/test/dummy-rails4/config.ru +0 -4
  55. data/test/dummy-rails4/config/application.rb +0 -27
  56. data/test/dummy-rails4/config/boot.rb +0 -4
  57. data/test/dummy-rails4/config/database.yml +0 -25
  58. data/test/dummy-rails4/config/environment.rb +0 -5
  59. data/test/dummy-rails4/config/environments/development.rb +0 -29
  60. data/test/dummy-rails4/config/environments/production.rb +0 -80
  61. data/test/dummy-rails4/config/environments/test.rb +0 -36
  62. data/test/dummy-rails4/config/initializers/backtrace_silencers.rb +0 -7
  63. data/test/dummy-rails4/config/initializers/filter_parameter_logging.rb +0 -4
  64. data/test/dummy-rails4/config/initializers/inflections.rb +0 -16
  65. data/test/dummy-rails4/config/initializers/mime_types.rb +0 -5
  66. data/test/dummy-rails4/config/initializers/secret_token.rb +0 -12
  67. data/test/dummy-rails4/config/initializers/session_store.rb +0 -3
  68. data/test/dummy-rails4/config/initializers/wrap_parameters.rb +0 -14
  69. data/test/dummy-rails4/config/locales/en.yml +0 -23
  70. data/test/dummy-rails4/config/routes.rb +0 -56
  71. data/test/dummy-rails4/db/migrate/20131027192625_create_manufacturers.rb +0 -9
  72. data/test/dummy-rails4/db/migrate/20131027192834_create_widgets.rb +0 -11
  73. data/test/dummy-rails4/db/schema.rb +0 -28
  74. data/test/dummy-rails4/db/seeds.rb +0 -7
  75. data/test/dummy-rails4/public/404.html +0 -58
  76. data/test/dummy-rails4/public/422.html +0 -58
  77. data/test/dummy-rails4/public/500.html +0 -57
  78. data/test/dummy-rails4/public/favicon.ico +0 -0
  79. data/test/dummy-rails4/public/robots.txt +0 -5
data/README.md CHANGED
@@ -6,6 +6,10 @@
6
6
 
7
7
  Rails plugin that provides `attr_initializable` helper to declare read-only attributes that can be mass-assigned at model creation time
8
8
 
9
+ # Rails support
10
+
11
+ Works with Rails 3.2.x and Rails 4.0.x with `protected_attributes` compatibility gem.
12
+
9
13
  # Installation
10
14
 
11
15
  Add `gem 'attr_initializable'` to your Rails' `Gemfile` and run `bundle install`.
data/Rakefile CHANGED
@@ -12,10 +12,6 @@ rescue LoadError
12
12
  RDoc::Task = Rake::RDocTask
13
13
  end
14
14
 
15
- require File.expand_path('../test/test_utils', __FILE__)
16
-
17
- puts "Testing against Rails #{TestUtils.rails_version} with dummy application in #{TestUtils.dummy_app_dir}"
18
-
19
15
  RDoc::Task.new(:rdoc) do |rdoc|
20
16
  rdoc.rdoc_dir = 'rdoc'
21
17
  rdoc.title = 'AttrInitializable'
@@ -35,9 +31,5 @@ Rake::TestTask.new(:test) do |t|
35
31
  t.verbose = false
36
32
  end
37
33
 
38
- task :test_db_reset do |t|
39
- sh "cd test/#{TestUtils.dummy_app_dir}/ && RAILS_ENV=test bundle exec rake db:reset"
40
- end
41
-
42
34
  task :default => :test
43
35
 
@@ -8,8 +8,9 @@ module AttrInitializable
8
8
  'Please add `protected_attributes` to your Gemfile to use `attr_initializable`.')
9
9
  end
10
10
 
11
- unless Rails.configuration.active_record.mass_assignment_sanitizer == :strict
12
- logger.warn "WARNING: Running with strict mass assignment sanitizer is recommended.\n" \
11
+ unless ActiveRecord::Base.respond_to?('_mass_assignment_sanitizer') &&
12
+ ActiveRecord::Base.send('_mass_assignment_sanitizer').is_a?(ActiveModel::MassAssignmentSecurity::StrictSanitizer)
13
+ puts "WARNING: Running with strict mass assignment sanitizer is recommended.\n" \
13
14
  "Please add config.active_record.mass_assignment_sanitizer = :strict to config/application.rb.\n"
14
15
  end
15
16
 
@@ -31,6 +32,6 @@ module AttrInitializable
31
32
  end
32
33
  end
33
34
  end
34
-
35
+
35
36
  ActiveRecord::Base.send :include, AttrInitializable
36
37
 
@@ -1,4 +1,4 @@
1
1
  module AttrInitializable
2
- VERSION = '0.0.2'
2
+ VERSION = '0.1.0'
3
3
  end
4
4
 
@@ -1,4 +1,31 @@
1
1
  require 'test_helper'
2
+ require 'attr_initializable'
3
+ require 'protected_attributes' if TestUtils.is_active_record_4?
4
+
5
+ ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => ':memory:'
6
+ ActiveRecord::Base.mass_assignment_sanitizer = :strict
7
+
8
+ silence_stream(STDOUT) do
9
+ ActiveRecord::Schema.define(:version => 1) do
10
+ create_table :manufacturers, :force => true do |t|
11
+ end
12
+
13
+ create_table :widgets, :force => true do |t|
14
+ t.integer :manufacturer_id
15
+ t.string :name
16
+ end
17
+ end
18
+ end
19
+
20
+ class Manufacturer < ActiveRecord::Base
21
+ end
22
+
23
+ class Widget < ActiveRecord::Base
24
+ attr_initializable :manufacturer_id, :as => :admin
25
+ attr_accessible :name
26
+
27
+ belongs_to :manufacturer
28
+ end
2
29
 
3
30
  class AttrInitializableTest < ActiveSupport::TestCase
4
31
  test 'default role cannot mass-assign manufacturer at creation time' do
data/test/test_helper.rb CHANGED
@@ -1,23 +1,9 @@
1
- require File.expand_path('../test_utils', __FILE__)
2
-
3
1
  require 'coveralls'
4
2
  Coveralls.wear!
5
3
 
6
- # Configure Rails Environment
7
- ENV['RAILS_ENV'] = 'test'
8
-
9
- require File.expand_path("../#{TestUtils.dummy_app_dir}/config/environment.rb", __FILE__)
10
- require 'rails/test_help'
11
-
12
- puts "Rails #{Rails.version} is loaded"
13
-
14
- Rails.backtrace_cleaner.remove_silencers!
15
-
16
- # Load support files
17
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
4
+ require File.expand_path('../test_utils', __FILE__)
5
+ require 'attr_initializable'
18
6
 
19
- # Load fixtures from the engine
20
- if ActiveSupport::TestCase.method_defined?(:fixture_path=)
21
- ActiveSupport::TestCase.fixture_path = File.expand_path('../fixtures', __FILE__)
22
- end
7
+ puts "Active Record #{TestUtils.active_record_version} is loaded"
8
+ require 'minitest/autorun'
23
9
 
data/test/test_utils.rb CHANGED
@@ -1,27 +1,22 @@
1
- require 'rails'
1
+ require 'active_record'
2
2
 
3
3
  module TestUtils
4
4
  extend self
5
5
 
6
- def rails_version
7
- @rails_version ||= Gem::Version.new(Rails.version)
6
+ ACTIVE_RECORD_3_MINIMUM_VERSION = Gem::Version.new('3.2.0')
7
+ ACTIVE_RECORD_4_MINIMUM_VERSION = Gem::Version.new('4.0.0')
8
+ ACTIVE_RECORD_5_MINIMUM_VERSION = Gem::Version.new('5.0.0')
9
+
10
+ def active_record_version
11
+ @active_record_version ||= Gem.loaded_specs['activerecord'].version
8
12
  end
9
13
 
10
- def rails_version_in_range?(minimum_version, maximum_version)
11
- minimum_version = Gem::Version.new(minimum_version) if minimum_version.is_a?(String)
12
- maximum_version = Gem::Version.new(maximum_version) if maximum_version.is_a?(String)
13
- minimum_version <= rails_version && rails_version < maximum_version
14
+ def is_active_record_3?
15
+ ACTIVE_RECORD_3_MINIMUM_VERSION <= active_record_version && active_record_version < ACTIVE_RECORD_4_MINIMUM_VERSION
14
16
  end
15
17
 
16
- def dummy_app_dir
17
- major_version = if rails_version_in_range?('3.2.0', '4.0.0')
18
- '3'
19
- elsif rails_version_in_range?('4.0.0', '5.0.0')
20
- '4'
21
- else
22
- raise "Unsupported Rails version #{TestUtils.rails_version}"
23
- end
24
- "dummy-rails#{major_version}"
18
+ def is_active_record_4?
19
+ ACTIVE_RECORD_4_MINIMUM_VERSION <= active_record_version && active_record_version < ACTIVE_RECORD_5_MINIMUM_VERSION
25
20
  end
26
21
  end
27
22
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attr_initializable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,16 +9,19 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-08 00:00:00.000000000 Z
12
+ date: 2013-12-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rails
15
+ name: activerecord
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 3.2.14
21
+ version: 3.2.0
22
+ - - <
23
+ - !ruby/object:Gem::Version
24
+ version: 5.0.0
22
25
  type: :runtime
23
26
  prerelease: false
24
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +29,10 @@ dependencies:
26
29
  requirements:
27
30
  - - ! '>='
28
31
  - !ruby/object:Gem::Version
29
- version: 3.2.14
32
+ version: 3.2.0
33
+ - - <
34
+ - !ruby/object:Gem::Version
35
+ version: 5.0.0
30
36
  description: Rails plugin that provides attr_initializable helper to declare read-only
31
37
  attributes that can be mass-assigned at model creation time
32
38
  email: rcook@rcook.org
@@ -42,80 +48,9 @@ files:
42
48
  - README.md
43
49
  - test/test_helper.rb
44
50
  - test/test_utils.rb
45
- - test/dummy-rails4/public/500.html
46
- - test/dummy-rails4/public/404.html
47
- - test/dummy-rails4/public/robots.txt
48
- - test/dummy-rails4/public/422.html
49
- - test/dummy-rails4/public/favicon.ico
50
- - test/dummy-rails4/bin/rails
51
- - test/dummy-rails4/bin/rake
52
- - test/dummy-rails4/bin/bundle
53
- - test/dummy-rails4/config/locales/en.yml
54
- - test/dummy-rails4/config/environment.rb
55
- - test/dummy-rails4/config/environments/development.rb
56
- - test/dummy-rails4/config/environments/production.rb
57
- - test/dummy-rails4/config/environments/test.rb
58
- - test/dummy-rails4/config/routes.rb
59
- - test/dummy-rails4/config/initializers/filter_parameter_logging.rb
60
- - test/dummy-rails4/config/initializers/inflections.rb
61
- - test/dummy-rails4/config/initializers/wrap_parameters.rb
62
- - test/dummy-rails4/config/initializers/mime_types.rb
63
- - test/dummy-rails4/config/initializers/secret_token.rb
64
- - test/dummy-rails4/config/initializers/session_store.rb
65
- - test/dummy-rails4/config/initializers/backtrace_silencers.rb
66
- - test/dummy-rails4/config/database.yml
67
- - test/dummy-rails4/config/boot.rb
68
- - test/dummy-rails4/config/application.rb
69
- - test/dummy-rails4/app/views/layouts/application.html.erb
70
- - test/dummy-rails4/app/assets/javascripts/application.js
71
- - test/dummy-rails4/app/assets/stylesheets/application.css
72
- - test/dummy-rails4/app/controllers/application_controller.rb
73
- - test/dummy-rails4/app/models/widget.rb
74
- - test/dummy-rails4/app/models/manufacturer.rb
75
- - test/dummy-rails4/app/helpers/application_helper.rb
76
- - test/dummy-rails4/config.ru
77
51
  - test/dummy-rails4/log/development.log
78
52
  - test/dummy-rails4/log/test.log
79
- - test/dummy-rails4/Rakefile
80
- - test/dummy-rails4/db/schema.rb
81
- - test/dummy-rails4/db/seeds.rb
82
- - test/dummy-rails4/db/migrate/20131027192625_create_manufacturers.rb
83
- - test/dummy-rails4/db/migrate/20131027192834_create_widgets.rb
84
53
  - test/dummy-rails4/db/test.sqlite3
85
- - test/dummy-rails3/public/500.html
86
- - test/dummy-rails3/public/404.html
87
- - test/dummy-rails3/public/422.html
88
- - test/dummy-rails3/public/favicon.ico
89
- - test/dummy-rails3/script/rails
90
- - test/dummy-rails3/config/locales/en.yml
91
- - test/dummy-rails3/config/environment.rb
92
- - test/dummy-rails3/config/environments/development.rb
93
- - test/dummy-rails3/config/environments/production.rb
94
- - test/dummy-rails3/config/environments/test.rb
95
- - test/dummy-rails3/config/routes.rb
96
- - test/dummy-rails3/config/initializers/inflections.rb
97
- - test/dummy-rails3/config/initializers/wrap_parameters.rb
98
- - test/dummy-rails3/config/initializers/mime_types.rb
99
- - test/dummy-rails3/config/initializers/secret_token.rb
100
- - test/dummy-rails3/config/initializers/session_store.rb
101
- - test/dummy-rails3/config/initializers/backtrace_silencers.rb
102
- - test/dummy-rails3/config/database.yml
103
- - test/dummy-rails3/config/boot.rb
104
- - test/dummy-rails3/config/application.rb
105
- - test/dummy-rails3/app/views/layouts/application.html.erb
106
- - test/dummy-rails3/app/assets/javascripts/application.js
107
- - test/dummy-rails3/app/assets/stylesheets/application.css
108
- - test/dummy-rails3/app/controllers/application_controller.rb
109
- - test/dummy-rails3/app/models/widget.rb
110
- - test/dummy-rails3/app/models/manufacturer.rb
111
- - test/dummy-rails3/app/helpers/application_helper.rb
112
- - test/dummy-rails3/config.ru
113
- - test/dummy-rails3/log/test.log
114
- - test/dummy-rails3/Rakefile
115
- - test/dummy-rails3/db/schema.rb
116
- - test/dummy-rails3/db/migrate/20131027192625_create_manufacturers.rb
117
- - test/dummy-rails3/db/migrate/20131027192834_create_widgets.rb
118
- - test/dummy-rails3/db/test.sqlite3
119
54
  - test/attr_initializable_test.rb
120
55
  homepage: https://github.com/rcook/attr_initializable/
121
56
  licenses:
@@ -145,78 +80,7 @@ summary: attr_initializable
145
80
  test_files:
146
81
  - test/test_helper.rb
147
82
  - test/test_utils.rb
148
- - test/dummy-rails4/public/500.html
149
- - test/dummy-rails4/public/404.html
150
- - test/dummy-rails4/public/robots.txt
151
- - test/dummy-rails4/public/422.html
152
- - test/dummy-rails4/public/favicon.ico
153
- - test/dummy-rails4/bin/rails
154
- - test/dummy-rails4/bin/rake
155
- - test/dummy-rails4/bin/bundle
156
- - test/dummy-rails4/config/locales/en.yml
157
- - test/dummy-rails4/config/environment.rb
158
- - test/dummy-rails4/config/environments/development.rb
159
- - test/dummy-rails4/config/environments/production.rb
160
- - test/dummy-rails4/config/environments/test.rb
161
- - test/dummy-rails4/config/routes.rb
162
- - test/dummy-rails4/config/initializers/filter_parameter_logging.rb
163
- - test/dummy-rails4/config/initializers/inflections.rb
164
- - test/dummy-rails4/config/initializers/wrap_parameters.rb
165
- - test/dummy-rails4/config/initializers/mime_types.rb
166
- - test/dummy-rails4/config/initializers/secret_token.rb
167
- - test/dummy-rails4/config/initializers/session_store.rb
168
- - test/dummy-rails4/config/initializers/backtrace_silencers.rb
169
- - test/dummy-rails4/config/database.yml
170
- - test/dummy-rails4/config/boot.rb
171
- - test/dummy-rails4/config/application.rb
172
- - test/dummy-rails4/app/views/layouts/application.html.erb
173
- - test/dummy-rails4/app/assets/javascripts/application.js
174
- - test/dummy-rails4/app/assets/stylesheets/application.css
175
- - test/dummy-rails4/app/controllers/application_controller.rb
176
- - test/dummy-rails4/app/models/widget.rb
177
- - test/dummy-rails4/app/models/manufacturer.rb
178
- - test/dummy-rails4/app/helpers/application_helper.rb
179
- - test/dummy-rails4/config.ru
180
83
  - test/dummy-rails4/log/development.log
181
84
  - test/dummy-rails4/log/test.log
182
- - test/dummy-rails4/Rakefile
183
- - test/dummy-rails4/db/schema.rb
184
- - test/dummy-rails4/db/seeds.rb
185
- - test/dummy-rails4/db/migrate/20131027192625_create_manufacturers.rb
186
- - test/dummy-rails4/db/migrate/20131027192834_create_widgets.rb
187
85
  - test/dummy-rails4/db/test.sqlite3
188
- - test/dummy-rails3/public/500.html
189
- - test/dummy-rails3/public/404.html
190
- - test/dummy-rails3/public/422.html
191
- - test/dummy-rails3/public/favicon.ico
192
- - test/dummy-rails3/script/rails
193
- - test/dummy-rails3/config/locales/en.yml
194
- - test/dummy-rails3/config/environment.rb
195
- - test/dummy-rails3/config/environments/development.rb
196
- - test/dummy-rails3/config/environments/production.rb
197
- - test/dummy-rails3/config/environments/test.rb
198
- - test/dummy-rails3/config/routes.rb
199
- - test/dummy-rails3/config/initializers/inflections.rb
200
- - test/dummy-rails3/config/initializers/wrap_parameters.rb
201
- - test/dummy-rails3/config/initializers/mime_types.rb
202
- - test/dummy-rails3/config/initializers/secret_token.rb
203
- - test/dummy-rails3/config/initializers/session_store.rb
204
- - test/dummy-rails3/config/initializers/backtrace_silencers.rb
205
- - test/dummy-rails3/config/database.yml
206
- - test/dummy-rails3/config/boot.rb
207
- - test/dummy-rails3/config/application.rb
208
- - test/dummy-rails3/app/views/layouts/application.html.erb
209
- - test/dummy-rails3/app/assets/javascripts/application.js
210
- - test/dummy-rails3/app/assets/stylesheets/application.css
211
- - test/dummy-rails3/app/controllers/application_controller.rb
212
- - test/dummy-rails3/app/models/widget.rb
213
- - test/dummy-rails3/app/models/manufacturer.rb
214
- - test/dummy-rails3/app/helpers/application_helper.rb
215
- - test/dummy-rails3/config.ru
216
- - test/dummy-rails3/log/test.log
217
- - test/dummy-rails3/Rakefile
218
- - test/dummy-rails3/db/schema.rb
219
- - test/dummy-rails3/db/migrate/20131027192625_create_manufacturers.rb
220
- - test/dummy-rails3/db/migrate/20131027192834_create_widgets.rb
221
- - test/dummy-rails3/db/test.sqlite3
222
86
  - test/attr_initializable_test.rb
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env rake
2
- # Add your own tasks in files placed in lib/tasks ending in .rake,
3
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
-
5
- require File.expand_path('../config/application', __FILE__)
6
-
7
- Dummy::Application.load_tasks
@@ -1,15 +0,0 @@
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
- // the compiled file.
9
- //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
12
- //
13
- //= require jquery
14
- //= require jquery_ujs
15
- //= require_tree .
@@ -1,13 +0,0 @@
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 top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require_tree .
13
- */
@@ -1,3 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- protect_from_forgery
3
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,3 +0,0 @@
1
- class Manufacturer < ActiveRecord::Base
2
- # attr_accessible :title, :body
3
- end
@@ -1,7 +0,0 @@
1
- class Widget < ActiveRecord::Base
2
- attr_initializable :manufacturer_id, :as => :admin
3
- attr_accessible :name
4
-
5
- belongs_to :manufacturer
6
- end
7
-
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag "application", :media => "all" %>
6
- <%= javascript_include_tag "application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Dummy::Application