erp_tech_svcs 3.0.12 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/erp_tech_svcs/session_controller.rb +1 -1
- data/app/models/attribute_type.rb +2 -0
- data/app/models/attribute_value.rb +2 -0
- data/app/models/audit_log.rb +4 -1
- data/app/models/audit_log_item.rb +2 -0
- data/app/models/audit_log_item_type.rb +2 -0
- data/app/models/audit_log_type.rb +2 -0
- data/app/models/capability.rb +2 -1
- data/app/models/capability_type.rb +2 -0
- data/app/models/extensions/category.rb +3 -0
- data/app/models/extensions/compass_ae_instance.rb +3 -0
- data/app/models/file_asset.rb +3 -1
- data/app/models/group.rb +5 -18
- data/app/models/scope_type.rb +1 -0
- data/app/models/security_role.rb +2 -0
- data/app/models/user.rb +29 -42
- data/app/views/user_mailer/activation_needed_email.html.erb +1 -1
- data/app/views/user_mailer/reset_password_email.html.erb +1 -1
- data/config/initializers/erp_tech_svcs.rb +2 -0
- data/db/data_migrations/20121130212146_note_capabilities.rb +2 -2
- data/db/migrate/20080805000010_base_tech_services.rb +3 -3
- data/lib/erp_tech_svcs/config.rb +4 -0
- data/lib/erp_tech_svcs/extensions/active_record/acts_as_versioned.rb +105 -106
- data/lib/erp_tech_svcs/extensions/active_record/has_capability_accessors.rb +4 -10
- data/lib/erp_tech_svcs/extensions/active_record/has_security_roles.rb +2 -0
- data/lib/erp_tech_svcs/extensions/active_record/protected_with_capabilities.rb +28 -53
- data/lib/erp_tech_svcs/extensions/railties/action_view/base.rb +8 -0
- data/lib/erp_tech_svcs/extensions/railties/action_view/helpers/include_helper.rb +28 -0
- data/lib/erp_tech_svcs/extensions.rb +3 -0
- data/lib/erp_tech_svcs/file_support/railties/s3_resolver.rb +1 -1
- data/lib/erp_tech_svcs/sms_wrapper/clickatell.rb +3 -3
- data/lib/erp_tech_svcs/utils/compass_access_negotiator.rb +4 -6
- data/lib/erp_tech_svcs/version.rb +2 -2
- data/lib/erp_tech_svcs.rb +2 -1
- data/spec/dummy/config/application.rb +6 -0
- data/spec/dummy/config/environments/spec.rb +3 -0
- data/spec/dummy/config/s3.yml +23 -0
- data/spec/dummy/db/data_migrations/20120109173616_create_download_capability_type.erp_tech_svcs.rb +14 -0
- data/spec/dummy/db/migrate/{20130105133955_base_erp_services.erp_base_erp_svcs.rb → 20130107214445_base_erp_services.erp_base_erp_svcs.rb} +0 -0
- data/spec/dummy/db/migrate/{20130105133956_base_tech_services.erp_tech_svcs.rb → 20130107214446_base_tech_services.erp_tech_svcs.rb} +0 -0
- data/spec/dummy/db/migrate/{20130105133957_create_has_attribute_tables.erp_tech_svcs.rb → 20130107214447_create_has_attribute_tables.erp_tech_svcs.rb} +0 -0
- data/spec/dummy/db/migrate/{20130105133958_create_groups.erp_tech_svcs.rb → 20130107214448_create_groups.erp_tech_svcs.rb} +0 -0
- data/spec/dummy/db/migrate/{20130105133959_upgrade_security.erp_tech_svcs.rb → 20130107214449_upgrade_security.erp_tech_svcs.rb} +0 -0
- data/spec/dummy/db/migrate/{20130105133960_upgrade_security2.erp_tech_svcs.rb → 20130107214450_upgrade_security2.erp_tech_svcs.rb} +0 -0
- data/spec/dummy/db/schema.rb +1 -1
- data/spec/dummy/db/spec.sqlite3 +0 -0
- data/spec/dummy/log/spec.log +15314 -121571
- data/spec/dummy/move_test_tmp/file_asset_spec_text.txt +1 -0
- data/spec/lib/erp_tech_svcs/extensions/active_record/has_roles_spec.rb +6 -6
- data/spec/lib/file_support/s3_manager_spec.rb +1 -0
- data/spec/models/audit_log_spec.rb +1 -1
- data/spec/models/file_asset_spec.rb +14 -5
- data/spec/models/group_spec.rb +41 -0
- data/spec/models/security_role_spec.rb +26 -0
- data/spec/models/user_spec.rb +12 -2
- data/spec/spec_helper.rb +12 -7
- metadata +65 -48
- data/db/data_migrations/upgrade/20120727152144_set_image_dimensions_on_file_assets.rb +0 -13
- data/db/migrate/upgrade/20111109161549_add_capabilites.rb +0 -56
- data/db/migrate/upgrade/20111109161550_update_roles.rb +0 -35
- data/db/migrate/upgrade/20111109161551_update_user.rb +0 -88
- data/db/migrate/upgrade/20120329161641_add_file_asset_indexes.rb +0 -22
- data/db/migrate/upgrade/20120517203052_add_queue_to_delayed_jobs.rb +0 -13
- data/db/migrate/upgrade/20120725205131_add_image_dimension_columns_to_file_asset.rb +0 -15
- data/lib/erp_tech_svcs/application_installer.rb +0 -102
- data/lib/erp_tech_svcs/utils/attachment_fu_patch.rb +0 -15
- data/lib/erp_tech_svcs/utils/compass_pdf.rb +0 -72
- data/lib/erp_tech_svcs/utils/pdf_processor.rb +0 -106
- data/spec/dummy/log/adam.log +0 -1
- data/spec/factories/role.rb +0 -5
- data/spec/models/role_spec.rb +0 -17
- data/spec/models/secured_model_spec.rb +0 -22
@@ -77,8 +77,7 @@ module ErpTechSvcs
|
|
77
77
|
|
78
78
|
# pass in (capability_type_iid, klass) or (capability) object
|
79
79
|
def add_capability(*capability)
|
80
|
-
|
81
|
-
capability = capability_type_iid.is_a?(String) ? get_or_create_capability(capability_type_iid, capability.second) : capability.first
|
80
|
+
capability = capability.first.is_a?(String) ? get_or_create_capability(capability.first, capability.second) : capability.first
|
82
81
|
ca = CapabilityAccessor.find_or_create_by_capability_accessor_record_type_and_capability_accessor_record_id_and_capability_id(get_superclass, self.id, capability.id)
|
83
82
|
self.reload
|
84
83
|
ca
|
@@ -90,12 +89,8 @@ module ErpTechSvcs
|
|
90
89
|
|
91
90
|
def get_or_create_capability(capability_type_iid, klass)
|
92
91
|
capability_type = convert_capability_type(capability_type_iid)
|
93
|
-
|
94
|
-
|
95
|
-
Capability.find_or_create_by_capability_resource_type_and_capability_type_id_and_scope_type_id(klass, capability_type.id, scope_type.id)
|
96
|
-
else
|
97
|
-
klass.add_capability(capability_type_iid) # create instance capability
|
98
|
-
end
|
92
|
+
scope_type = ScopeType.find_by_internal_identifier('class')
|
93
|
+
Capability.find_or_create_by_capability_resource_type_and_capability_type_id_and_scope_type_id(klass, capability_type.id, scope_type.id)
|
99
94
|
end
|
100
95
|
|
101
96
|
def get_capability(capability_type_iid, klass)
|
@@ -106,8 +101,7 @@ module ErpTechSvcs
|
|
106
101
|
|
107
102
|
# pass in (capability_type_iid, klass) or (capability) object
|
108
103
|
def remove_capability(*capability)
|
109
|
-
|
110
|
-
capability = capability_type_iid.is_a?(String) ? get_or_create_capability(capability_type_iid, capability.second) : capability.first
|
104
|
+
capability = capability.first.is_a?(String) ? get_or_create_capability(capability.first, capability.second) : capability.first
|
111
105
|
ca = capability_accessors.where(:capability_accessor_record_type => get_superclass, :capability_accessor_record_id => self.id, :capability_id => capability.id).first
|
112
106
|
ca.destroy unless ca.nil?
|
113
107
|
self.reload
|
@@ -9,24 +9,15 @@ module ErpTechSvcs
|
|
9
9
|
|
10
10
|
module ClassMethods
|
11
11
|
|
12
|
-
def protected_with_capabilities
|
12
|
+
def protected_with_capabilities
|
13
13
|
extend ProtectedByCapabilities::SingletonMethods
|
14
14
|
include ProtectedByCapabilities::InstanceMethods
|
15
|
-
|
16
|
-
has_many :capabilities, :as => :capability_resource
|
17
15
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
#
|
23
|
-
# By default Compass AE treats query scopes as restrictions
|
24
|
-
# A user will see all records unless the user has a capability accessor with a query scope
|
25
|
-
# If you set :protect_all_instances => true it is honored via with_user_security & with_instance_security but NOT with_query_security
|
26
|
-
# arguments: user, capability_type_iids
|
27
|
-
# capability_type_iids is optional and can be a single string or an array of strings
|
28
|
-
# Example: which files can this user download? FileAsset.with_query_security(user, 'download').all
|
29
|
-
# Example: which website sections can this user either view or edit? WebsiteSection.with_query_security(user, ['view','edit']).all
|
16
|
+
has_many :capabilities, :as => :capability_resource
|
17
|
+
|
18
|
+
# get records filtered via query scope capabilities
|
19
|
+
# by default Compass AE treats query scopes as restrictions
|
20
|
+
# a user will see all records unless the user has a capability accessor with a query scope
|
30
21
|
scope :with_query_security, lambda{|*args|
|
31
22
|
raise ArgumentError if args.empty? || args.size > 2
|
32
23
|
user = args.first
|
@@ -34,11 +25,11 @@ module ErpTechSvcs
|
|
34
25
|
capability_type_iids = [capability_type_iids] if capability_type_iids.is_a?(String)
|
35
26
|
|
36
27
|
scope_type = ScopeType.find_by_internal_identifier('query')
|
37
|
-
granted_capabilities = user.all_capabilities.
|
28
|
+
granted_capabilities = user.all_capabilities.collect{|c| c if c.scope_type_id == scope_type.id and c.capability_resource_type == self.name }.compact
|
38
29
|
|
39
30
|
unless capability_type_iids.empty?
|
40
31
|
capability_type_ids = capability_type_iids.collect{|type| convert_capability_type(type).id }
|
41
|
-
granted_capabilities = granted_capabilities.
|
32
|
+
granted_capabilities = granted_capabilities.collect{|c| c if capability_type_ids.include?(c.capability_type_id)}.compact
|
42
33
|
end
|
43
34
|
|
44
35
|
query = nil
|
@@ -48,45 +39,34 @@ module ErpTechSvcs
|
|
48
39
|
query
|
49
40
|
}
|
50
41
|
|
51
|
-
#
|
52
|
-
|
53
|
-
|
42
|
+
# get records for this model without capabilities or that are not in a list of denied capabilities
|
43
|
+
scope :with_instance_security, lambda{|denied_capabilities|
|
44
|
+
query = joins("LEFT JOIN capabilities AS c ON c.capability_resource_id = #{self.table_name}.id AND c.capability_resource_type = '#{self.name}'").
|
45
|
+
group(columns.collect{|c| "#{self.table_name}.#{c.name}" })
|
46
|
+
query = (denied_capabilities.empty? ? query.where("c.id IS NULL OR c.id = c.id") : query.where("c.id IS NULL OR c.id NOT IN (?)", denied_capabilities.collect{|c| c.id }))
|
47
|
+
query
|
48
|
+
}
|
49
|
+
|
50
|
+
# get records for this model that the given user has access to
|
54
51
|
# arguments: user, capability_type_iids
|
55
52
|
# capability_type_iids is optional and can be a single string or an array of strings
|
56
|
-
# Example: which files can this user download? FileAsset.
|
57
|
-
# Example: which website sections can this user either view or edit? WebsiteSection.
|
58
|
-
scope :
|
53
|
+
# Example: which files can this user download? FileAsset.with_user_security(user, 'download').all
|
54
|
+
# Example: which website sections can this user either view or edit? WebsiteSection.with_user_security(user, ['view','edit']).all
|
55
|
+
scope :with_user_security, lambda{|*args|
|
59
56
|
raise ArgumentError if args.empty? || args.size > 2
|
60
57
|
user = args.first
|
61
58
|
capability_type_iids = args.second || []
|
62
59
|
capability_type_iids = [capability_type_iids] if capability_type_iids.is_a?(String)
|
63
60
|
|
64
61
|
scope_type = ScopeType.find_by_internal_identifier('instance')
|
65
|
-
granted_capabilities = user.all_capabilities.
|
62
|
+
granted_capabilities = user.all_capabilities.collect{|c| c if c.scope_type_id == scope_type.id and c.capability_resource_type == self.name }.compact
|
66
63
|
|
67
64
|
unless capability_type_iids.empty?
|
68
65
|
capability_type_ids = capability_type_iids.collect{|type| convert_capability_type(type).id }
|
69
|
-
granted_capabilities = granted_capabilities.
|
66
|
+
granted_capabilities = granted_capabilities.collect{|c| c if capability_type_ids.include?(c.capability_type_id)}.compact
|
70
67
|
end
|
71
|
-
|
72
|
-
|
73
|
-
deny_count = denied_capabilities.count
|
74
|
-
|
75
|
-
join_type = (self.protect_all_instances ? 'JOIN' : 'LEFT JOIN')
|
76
|
-
query = joins("#{join_type} capabilities AS c ON c.capability_resource_id = #{self.table_name}.id AND c.capability_resource_type = '#{self.name}'").
|
77
|
-
group(columns.collect{|c| "#{self.table_name}.#{c.name}" })
|
78
|
-
query = (deny_count == 0 ? query.where("c.id IS NULL OR c.id = c.id") : query.where("c.id IS NULL OR c.id NOT IN (#{denied_capabilities.to_sql})"))
|
79
|
-
query
|
80
|
-
}
|
81
|
-
|
82
|
-
# Get records for this model that the given user has access to
|
83
|
-
# arguments: user, capability_type_iids
|
84
|
-
# capability_type_iids is optional and can be a single string or an array of strings
|
85
|
-
# Example: which files can this user download? FileAsset.with_user_security(user, 'download').all
|
86
|
-
# Example: which website sections can this user either view or edit? WebsiteSection.with_user_security(user, ['view','edit']).all
|
87
|
-
scope :with_user_security, lambda{|*args|
|
88
|
-
raise ArgumentError if args.empty? || args.size > 2
|
89
|
-
with_instance_security(*args).with_query_security(*args)
|
68
|
+
|
69
|
+
with_query_security(*args).with_instance_security(instance_capabilities - granted_capabilities)
|
90
70
|
}
|
91
71
|
end
|
92
72
|
end
|
@@ -122,9 +102,9 @@ module ErpTechSvcs
|
|
122
102
|
capabilities.where(:scope_type_id => scope_type.id)
|
123
103
|
end
|
124
104
|
|
125
|
-
#
|
105
|
+
# collect unique roles on capabilities
|
126
106
|
def capability_roles
|
127
|
-
|
107
|
+
capabilities.collect{|c| c.roles }.flatten.uniq
|
128
108
|
end
|
129
109
|
|
130
110
|
# add a class level capability (capability_resource_id will be NULL)
|
@@ -167,11 +147,6 @@ module ErpTechSvcs
|
|
167
147
|
|
168
148
|
module InstanceMethods
|
169
149
|
|
170
|
-
# convenience method to access class method
|
171
|
-
def protect_all_instances
|
172
|
-
self.class.protect_all_instances
|
173
|
-
end
|
174
|
-
|
175
150
|
def add_capability(capability_type_iid)
|
176
151
|
capability_type = convert_capability_type(capability_type_iid)
|
177
152
|
scope_type = ScopeType.find_by_internal_identifier('instance')
|
@@ -190,11 +165,11 @@ module ErpTechSvcs
|
|
190
165
|
end
|
191
166
|
|
192
167
|
def protected_with_capability?(capability_type_iid)
|
193
|
-
!get_capability(capability_type_iid).nil?
|
168
|
+
!get_capability(capability_type_iid).nil?
|
194
169
|
end
|
195
170
|
|
196
171
|
def allow_access?(user, capability_type_iid)
|
197
|
-
if
|
172
|
+
if !self.protected_with_capability?(capability_type_iid.to_s) or (user and user.has_capability?(capability_type_iid.to_s, self))
|
198
173
|
return true
|
199
174
|
else
|
200
175
|
return false
|
@@ -0,0 +1,8 @@
|
|
1
|
+
#require all ActionView helper files
|
2
|
+
Dir.entries(File.join(File.dirname(__FILE__),"helpers")).delete_if{|name| name =~ /^\./}.each do |file|
|
3
|
+
require "erp_tech_svcs/extensions/railties/action_view/helpers/#{file}"
|
4
|
+
end
|
5
|
+
|
6
|
+
ActionView::Base.class_eval do
|
7
|
+
include ErpTechSvcs::Extensions::Railties::ActionView::Helpers::IncludeHelper
|
8
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module ErpTechSvcs
|
2
|
+
module Extensions
|
3
|
+
module Railties
|
4
|
+
module ActionView
|
5
|
+
module Helpers
|
6
|
+
module IncludeHelper
|
7
|
+
|
8
|
+
def set_max_file_upload
|
9
|
+
raw "<script type='text/javascript'>Ext.ns('ErpTechSvcs.Config'); ErpTechSvcs.Config.max_file_size_in_mb = #{ErpTechSvcs::Config.max_file_size_in_mb};</script>"
|
10
|
+
end
|
11
|
+
|
12
|
+
def set_email_regex
|
13
|
+
raw "<script type='text/javascript'>ErpTechSvcs.Config.email_regex = \"#{ErpTechSvcs::Config.email_regex}\";</script>"
|
14
|
+
end
|
15
|
+
|
16
|
+
def set_file_upload_types
|
17
|
+
raw "<script type='text/javascript'>ErpTechSvcs.Config.file_upload_types = \"#{ErpTechSvcs::Config.file_upload_types}\";</script>"
|
18
|
+
end
|
19
|
+
|
20
|
+
def set_erp_tech_config_vars
|
21
|
+
raw "#{set_max_file_upload} #{set_email_regex} #{set_file_upload_types}"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -19,7 +19,7 @@ module ActionView
|
|
19
19
|
def cached(key, path_info, details, locals) #:nodoc:
|
20
20
|
file_support = ErpTechSvcs::FileSupport::Base.new(:storage => :s3)
|
21
21
|
name, prefix, partial = path_info
|
22
|
-
locals =
|
22
|
+
locals = locals.map { |x| x.to_s }.sort!
|
23
23
|
|
24
24
|
if key && caching?
|
25
25
|
if @cached[key][name][prefix][partial][locals].nil? or @cached[key][name][prefix][partial][locals].empty?
|
@@ -13,17 +13,15 @@ module ErpTechSvcs
|
|
13
13
|
where(:capability_resource_type => klass).
|
14
14
|
where(:scope_type_id => scope_type.id).
|
15
15
|
where(:capability_types => {:internal_identifier => capability_type_iid}).first
|
16
|
-
return nil if capability.nil? # capability not found so return nil
|
17
16
|
else
|
18
17
|
scope_type = ScopeType.find_by_internal_identifier('instance')
|
19
18
|
capability = klass.capabilities.joins(:capability_type).
|
20
19
|
where(:scope_type_id => scope_type.id).
|
21
20
|
where(:capability_types => {:internal_identifier => capability_type_iid}).first
|
22
|
-
|
23
|
-
# if all instance are protected, return false, otherwise true
|
24
|
-
return !klass.protect_all_instances if capability.nil?
|
21
|
+
return true if capability.nil? # object is not secured, so return true
|
25
22
|
end
|
26
|
-
all_capabilities.
|
23
|
+
result = all_capabilities.find{|c| c == capability }
|
24
|
+
result.nil? ? false : true
|
27
25
|
end
|
28
26
|
|
29
27
|
# pass in (capability_type_iid, class name or any class instance, a block of code)
|
@@ -52,7 +50,7 @@ module ErpTechSvcs
|
|
52
50
|
end
|
53
51
|
end
|
54
52
|
|
55
|
-
class
|
53
|
+
class CapabilityAlreadyExists < StandardError
|
56
54
|
def to_s
|
57
55
|
"Capability already exists."
|
58
56
|
end
|
data/lib/erp_tech_svcs.rb
CHANGED
@@ -4,14 +4,15 @@ require 'erp_base_erp_svcs'
|
|
4
4
|
require 'paperclip'
|
5
5
|
require 'delayed_job'
|
6
6
|
require 'delayed_job_active_record'
|
7
|
+
require 'mail_alternatives_with_attachments'
|
7
8
|
require 'sorcery'
|
8
9
|
require 'pdfkit'
|
10
|
+
require 'aws'
|
9
11
|
require "erp_tech_svcs/version"
|
10
12
|
require "erp_tech_svcs/utils/compass_logger"
|
11
13
|
require "erp_tech_svcs/utils/default_nested_set_methods"
|
12
14
|
require "erp_tech_svcs/utils/compass_access_negotiator"
|
13
15
|
require "erp_tech_svcs/extensions"
|
14
|
-
require 'aws'
|
15
16
|
require 'erp_tech_svcs/file_support'
|
16
17
|
require 'erp_tech_svcs/sms_wrapper'
|
17
18
|
require "erp_tech_svcs/config"
|
@@ -38,6 +38,12 @@ module Dummy
|
|
38
38
|
|
39
39
|
# Enable the asset pipeline
|
40
40
|
config.assets.enabled = true
|
41
|
+
|
42
|
+
# Enforce whitelist mode for mass assignment.
|
43
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
44
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
45
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
46
|
+
config.active_record.whitelist_attributes = true
|
41
47
|
end
|
42
48
|
end
|
43
49
|
|
@@ -1,6 +1,9 @@
|
|
1
1
|
Dummy::Application.configure do
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
|
+
# Raise exception on mass assignment protection for Active Record models
|
5
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
6
|
+
|
4
7
|
# In the development environment your application's code is reloaded on
|
5
8
|
# every request. This slows down response time but is perfect for development
|
6
9
|
# since you don't have to restart the web server when you make code changes.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
common: &common
|
2
|
+
access_key_id: AKIAIK3DDLVVJUWSHVPQ
|
3
|
+
secret_access_key: VkU48NcDxPLIXGu+oOgIzCTnW89AdHIuFkRGl4Va
|
4
|
+
|
5
|
+
production:
|
6
|
+
<<: *common
|
7
|
+
bucket: terralab
|
8
|
+
|
9
|
+
development:
|
10
|
+
<<: *common
|
11
|
+
bucket: terralabdev
|
12
|
+
|
13
|
+
test:
|
14
|
+
<<: *common
|
15
|
+
bucket: terralabtest
|
16
|
+
|
17
|
+
spec:
|
18
|
+
<<: *common
|
19
|
+
bucket: terralabtest
|
20
|
+
|
21
|
+
adam:
|
22
|
+
<<: *common
|
23
|
+
bucket: terralab
|
data/spec/dummy/db/data_migrations/20120109173616_create_download_capability_type.erp_tech_svcs.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# This migration comes from erp_tech_svcs (originally 20120109173616)
|
2
|
+
class CreateDownloadCapabilityType
|
3
|
+
|
4
|
+
def self.up
|
5
|
+
CapabilityType.create(:internal_identifier => 'download', :description => 'Download')
|
6
|
+
Role.create(:description => 'File Downloader', :internal_identifier => 'file_downloader')
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.down
|
10
|
+
CapabilityType.where("internal_identifier = 'download'").first.destroy unless Role.where("internal_identifier = 'download'").first.nil?
|
11
|
+
Role.where("internal_identifier = 'file_downloader'").first.destroy unless Role.where("internal_identifier = 'file_downloader'").first.nil?
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20130107214450) do
|
15
15
|
|
16
16
|
create_table "attribute_types", :force => true do |t|
|
17
17
|
t.string "internal_identifier"
|
data/spec/dummy/db/spec.sqlite3
CHANGED
Binary file
|