resource_controller 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,92 +37,96 @@
37
37
  #
38
38
  # You get the idea. Everything is automagical! All parameters are inferred.
39
39
  #
40
- module ResourceController::Helpers::Urls
41
- protected
42
- ['', 'edit_'].each do |type|
43
- symbol = type.blank? ? nil : type.gsub(/_/, '').to_sym
40
+ module ResourceController
41
+ module Helpers
42
+ module Urls
43
+ protected
44
+ ['', 'edit_'].each do |type|
45
+ symbol = type.blank? ? nil : type.gsub(/_/, '').to_sym
44
46
 
45
- define_method("#{type}object_url") do |*alternate_object|
46
- smart_url *object_url_options(symbol, alternate_object.first)
47
- end
47
+ define_method("#{type}object_url") do |*alternate_object|
48
+ smart_url *object_url_options(symbol, alternate_object.first)
49
+ end
48
50
 
49
- define_method("#{type}object_path") do |*alternate_object|
50
- smart_path *object_url_options(symbol, alternate_object.first)
51
- end
51
+ define_method("#{type}object_path") do |*alternate_object|
52
+ smart_path *object_url_options(symbol, alternate_object.first)
53
+ end
52
54
 
53
- define_method("hash_for_#{type}object_url") do |*alternate_object|
54
- hash_for_smart_url *object_url_options(symbol, alternate_object.first)
55
- end
55
+ define_method("hash_for_#{type}object_url") do |*alternate_object|
56
+ hash_for_smart_url *object_url_options(symbol, alternate_object.first)
57
+ end
56
58
 
57
- define_method("hash_for_#{type}object_path") do |*alternate_object|
58
- hash_for_smart_path *object_url_options(symbol, alternate_object.first)
59
- end
60
- end
59
+ define_method("hash_for_#{type}object_path") do |*alternate_object|
60
+ hash_for_smart_path *object_url_options(symbol, alternate_object.first)
61
+ end
62
+ end
61
63
 
62
- def new_object_url
63
- smart_url *new_object_url_options
64
- end
64
+ def new_object_url
65
+ smart_url *new_object_url_options
66
+ end
65
67
 
66
- def new_object_path
67
- smart_path *new_object_url_options
68
- end
68
+ def new_object_path
69
+ smart_path *new_object_url_options
70
+ end
69
71
 
70
- def hash_for_new_object_url
71
- hash_for_smart_url *new_object_url_options
72
- end
72
+ def hash_for_new_object_url
73
+ hash_for_smart_url *new_object_url_options
74
+ end
73
75
 
74
- def hash_for_new_object_path
75
- hash_for_smart_path *new_object_url_options
76
- end
76
+ def hash_for_new_object_path
77
+ hash_for_smart_path *new_object_url_options
78
+ end
77
79
 
78
- def collection_url
79
- smart_url *collection_url_options
80
- end
80
+ def collection_url
81
+ smart_url *collection_url_options
82
+ end
81
83
 
82
- def collection_path
83
- smart_path *collection_url_options
84
- end
84
+ def collection_path
85
+ smart_path *collection_url_options
86
+ end
85
87
 
86
- def hash_for_collection_url
87
- hash_for_smart_url *collection_url_options
88
- end
88
+ def hash_for_collection_url
89
+ hash_for_smart_url *collection_url_options
90
+ end
89
91
 
90
- def hash_for_collection_path
91
- hash_for_smart_path *collection_url_options
92
- end
92
+ def hash_for_collection_path
93
+ hash_for_smart_path *collection_url_options
94
+ end
93
95
 
94
- # Used internally to provide the options to smart_url from Urligence.
95
- #
96
- def collection_url_options
97
- namespaces + [parent_url_options, route_name.to_s.pluralize.to_sym]
98
- end
96
+ # Used internally to provide the options to smart_url from Urligence.
97
+ #
98
+ def collection_url_options
99
+ namespaces + [parent_url_options, route_name.to_s.pluralize.to_sym]
100
+ end
99
101
 
100
- # Used internally to provide the options to smart_url from Urligence.
101
- #
102
- def object_url_options(action_prefix = nil, alternate_object = nil)
103
- [action_prefix] + namespaces + [parent_url_options, [route_name.to_sym, alternate_object || object]]
104
- end
102
+ # Used internally to provide the options to smart_url from Urligence.
103
+ #
104
+ def object_url_options(action_prefix = nil, alternate_object = nil)
105
+ [action_prefix] + namespaces + [parent_url_options, [route_name.to_sym, alternate_object || object]]
106
+ end
105
107
 
106
- # Used internally to provide the options to smart_url from Urligence.
107
- #
108
- def new_object_url_options
109
- [:new] + namespaces + [parent_url_options, route_name.to_sym]
110
- end
108
+ # Used internally to provide the options to smart_url from Urligence.
109
+ #
110
+ def new_object_url_options
111
+ [:new] + namespaces + [parent_url_options, route_name.to_sym]
112
+ end
111
113
 
112
- def parent_url_options
113
- if parent?
114
- parent_singleton? ? parent_type.to_sym : [parent_type.to_sym, parent_object]
115
- else
116
- nil
117
- end
118
- end
114
+ def parent_url_options
115
+ if parent?
116
+ parent_singleton? ? parent_type.to_sym : [parent_type.to_sym, parent_object]
117
+ else
118
+ nil
119
+ end
120
+ end
119
121
 
120
- # Returns all of the current namespaces of the current controller, symbolized, in array form.
121
- #
122
- def namespaces
123
- names = self.class.name.split("::")
124
- names.pop
122
+ # Returns all of the current namespaces of the current controller, symbolized, in array form.
123
+ #
124
+ def namespaces
125
+ names = self.class.name.split("::")
126
+ names.pop
125
127
 
126
- names.map(&:underscore).map(&:to_sym)
128
+ names.map(&:underscore).map(&:to_sym)
129
+ end
127
130
  end
131
+ end
128
132
  end
@@ -1,3 +1,9 @@
1
+ require 'resource_controller/helpers/current_objects'
2
+ require 'resource_controller/helpers/internal'
3
+ require 'resource_controller/helpers/nested'
4
+ require 'resource_controller/helpers/singleton_customizations'
5
+ require 'resource_controller/helpers/urls'
6
+
1
7
  module ResourceController
2
8
  # == ResourceController::Helpers
3
9
  #
@@ -2,7 +2,7 @@ module ResourceController
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -1,3 +1,16 @@
1
+ $LOAD_PATH << File.dirname(__FILE__) unless $LOAD_PATH.include?(File.dirname(__FILE__))
2
+ require 'application'
3
+ require 'resource_controller/accessors'
4
+ require 'resource_controller/action_options'
5
+ require 'resource_controller/actions'
6
+ require 'resource_controller/base'
7
+ require 'resource_controller/class_methods'
8
+ require 'resource_controller/controller'
9
+ require 'resource_controller/failable_action_options'
10
+ require 'resource_controller/helpers'
11
+ require 'resource_controller/response_collector'
12
+ require 'resource_controller/singleton'
13
+ require 'resource_controller/version'
1
14
  require 'urligence'
2
15
 
3
16
  module ResourceController
@@ -5,7 +5,7 @@
5
5
  # ENV['RAILS_ENV'] ||= 'production'
6
6
 
7
7
  # Specifies gem version of Rails to use when vendor/rails is not present
8
- RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
8
+ RAILS_GEM_VERSION = '2.1.1' unless defined? RAILS_GEM_VERSION
9
9
 
10
10
  # Bootstrap the Rails environment, frameworks, and default configuration
11
11
  require File.join(File.dirname(__FILE__), 'boot')
@@ -44,21 +44,6 @@ Rails::Initializer.run do |config|
44
44
  # See Rails::Configuration for more options
45
45
 
46
46
  config.action_controller.session = { :session_key => "_myapp_session", :secret => "6c1372e61789239a727cdbc8252eb6da" }
47
+
48
+ config.gem 'resource_controller'
47
49
  end
48
-
49
- require "#{RAILS_ROOT}/../init"
50
-
51
- # Add new inflection rules using the following format
52
- # (all these examples are active by default):
53
- # Inflector.inflections do |inflect|
54
- # inflect.plural /^(ox)$/i, '\1en'
55
- # inflect.singular /^(ox)en/i, '\1'
56
- # inflect.irregular 'person', 'people'
57
- # inflect.uncountable %w( fish sheep )
58
- # end
59
-
60
- # Add new mime types for use in respond_to blocks:
61
- # Mime::Type.register "text/richtext", :rtf
62
- # Mime::Type.register "application/x-mobile", :mobile
63
-
64
- # Include your application configuration below
@@ -3084,3 +3084,267 @@ Migrating to CreatePosts (1)
3084
3084
  SQL (0.000486) INSERT INTO `schema_info` (version) VALUES(0)
3085
3085
  SQL (0.001158) SHOW FIELDS FROM `schema_info`
3086
3086
  SQL (0.000193) UPDATE schema_info SET version = 12
3087
+ DEPRECATION WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files. See http://www.rubyonrails.org/deprecation for details. (called from send at /Library/Ruby/Gems/1.8/gems/rails-2.1.1/lib/initializer.rb:464)
3088
+ SQL (0.000187) SET SQL_AUTO_IS_NULL=0
3089
+ SQL (0.024297) SHOW TABLES
3090
+ SQL (0.033981) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
3091
+ SQL (0.015440) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
3092
+ SQL (0.000423) SHOW TABLES
3093
+ SQL (0.030691) SELECT version FROM `schema_info`
3094
+ SQL (0.000346) SELECT version FROM `schema_migrations`
3095
+ SQL (0.000422) INSERT INTO `schema_migrations` (version) VALUES ('12')
3096
+ SQL (0.000436) INSERT INTO `schema_migrations` (version) VALUES ('1')
3097
+ SQL (0.000344) INSERT INTO `schema_migrations` (version) VALUES ('2')
3098
+ SQL (0.000468) INSERT INTO `schema_migrations` (version) VALUES ('3')
3099
+ SQL (0.000326) INSERT INTO `schema_migrations` (version) VALUES ('4')
3100
+ SQL (0.000445) INSERT INTO `schema_migrations` (version) VALUES ('5')
3101
+ SQL (0.000594) INSERT INTO `schema_migrations` (version) VALUES ('6')
3102
+ SQL (0.000443) INSERT INTO `schema_migrations` (version) VALUES ('7')
3103
+ SQL (0.000438) INSERT INTO `schema_migrations` (version) VALUES ('8')
3104
+ SQL (0.000364) INSERT INTO `schema_migrations` (version) VALUES ('9')
3105
+ SQL (0.000442) INSERT INTO `schema_migrations` (version) VALUES ('10')
3106
+ SQL (0.000373) INSERT INTO `schema_migrations` (version) VALUES ('11')
3107
+ SQL (0.017361) DROP TABLE `schema_info`
3108
+ SQL (0.000266) SELECT version FROM schema_migrations
3109
+ SQL (0.000104) SET SQL_AUTO_IS_NULL=0
3110
+ SQL (0.034901) DROP DATABASE IF EXISTS `resource_controller_test`
3111
+ SQL (0.071702) CREATE DATABASE `resource_controller_test` DEFAULT CHARACTER SET `utf8`
3112
+ SQL (0.000141) SET SQL_AUTO_IS_NULL=0
3113
+ SQL (0.000332) SHOW TABLES
3114
+ SQL (0.001666) CREATE TABLE `accounts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3115
+ SQL (0.000236) SHOW TABLES
3116
+ SQL (0.021300) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `post_id` int(11), `author` varchar(255), `body` text) ENGINE=InnoDB
3117
+ SQL (0.000270) SHOW TABLES
3118
+ SQL (0.001323) CREATE TABLE `images` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
3119
+ SQL (0.000249) SHOW TABLES
3120
+ SQL (0.004917) CREATE TABLE `options` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `product_id` int(11), `account_id` int(11), `title` varchar(255)) ENGINE=InnoDB
3121
+ SQL (0.000240) SHOW TABLES
3122
+ SQL (0.007711) CREATE TABLE `photos` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255), `account_id` int(11)) ENGINE=InnoDB
3123
+ SQL (0.000269) SHOW TABLES
3124
+ SQL (0.001499) CREATE TABLE `photos_tags` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `photo_id` int(11), `tag_id` int(11)) ENGINE=InnoDB
3125
+ SQL (0.000244) SHOW TABLES
3126
+ SQL (0.004818) CREATE TABLE `posts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255) DEFAULT '', `body` text) ENGINE=InnoDB
3127
+ SQL (0.000291) SHOW TABLES
3128
+ SQL (0.001560) CREATE TABLE `products` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3129
+ SQL (0.000405) SHOW TABLES
3130
+ SQL (0.004913) CREATE TABLE `projects` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB
3131
+ SQL (0.000354) SHOW TABLES
3132
+ SQL (0.001299) CREATE TABLE `somethings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB
3133
+ SQL (0.000349) SHOW TABLES
3134
+ SQL (0.006230) CREATE TABLE `tags` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3135
+ SQL (0.000403) SHOW TABLES
3136
+ SQL (0.001751) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
3137
+ SQL (0.000342) SHOW TABLES
3138
+ SQL (0.003781) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
3139
+ SQL (0.003342) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
3140
+ SQL (0.000373) SHOW TABLES
3141
+ SQL (0.000407) SELECT version FROM `schema_migrations`
3142
+ SQL (0.000361) INSERT INTO `schema_migrations` (version) VALUES ('12')
3143
+ SQL (0.000995) INSERT INTO `schema_migrations` (version) VALUES ('1')
3144
+ SQL (0.000318) INSERT INTO `schema_migrations` (version) VALUES ('2')
3145
+ SQL (0.009527) INSERT INTO `schema_migrations` (version) VALUES ('3')
3146
+ SQL (0.000291) INSERT INTO `schema_migrations` (version) VALUES ('4')
3147
+ SQL (0.000270) INSERT INTO `schema_migrations` (version) VALUES ('5')
3148
+ SQL (0.000274) INSERT INTO `schema_migrations` (version) VALUES ('6')
3149
+ SQL (0.000305) INSERT INTO `schema_migrations` (version) VALUES ('7')
3150
+ SQL (0.000283) INSERT INTO `schema_migrations` (version) VALUES ('8')
3151
+ SQL (0.000310) INSERT INTO `schema_migrations` (version) VALUES ('9')
3152
+ SQL (0.000271) INSERT INTO `schema_migrations` (version) VALUES ('10')
3153
+ SQL (0.000269) INSERT INTO `schema_migrations` (version) VALUES ('11')
3154
+ DEPRECATION WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files. See http://www.rubyonrails.org/deprecation for details. (called from send at /Library/Ruby/Gems/1.8/gems/rails-2.1.1/lib/initializer.rb:464)
3155
+ SQL (0.000189) SET SQL_AUTO_IS_NULL=0
3156
+ SQL (0.000405) SHOW TABLES
3157
+ SQL (0.000193) SELECT version FROM schema_migrations
3158
+ SQL (0.000101) SET SQL_AUTO_IS_NULL=0
3159
+ SQL (0.048931) DROP DATABASE IF EXISTS `resource_controller_test`
3160
+ SQL (0.000455) CREATE DATABASE `resource_controller_test` DEFAULT CHARACTER SET `utf8`
3161
+ SQL (0.000102) SET SQL_AUTO_IS_NULL=0
3162
+ SQL (0.000263) SHOW TABLES
3163
+ SQL (0.001946) CREATE TABLE `accounts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3164
+ SQL (0.000253) SHOW TABLES
3165
+ SQL (0.010296) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `post_id` int(11), `author` varchar(255), `body` text) ENGINE=InnoDB
3166
+ SQL (0.000274) SHOW TABLES
3167
+ SQL (0.007316) CREATE TABLE `images` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
3168
+ SQL (0.000250) SHOW TABLES
3169
+ SQL (0.001628) CREATE TABLE `options` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `product_id` int(11), `account_id` int(11), `title` varchar(255)) ENGINE=InnoDB
3170
+ SQL (0.000251) SHOW TABLES
3171
+ SQL (0.004782) CREATE TABLE `photos` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255), `account_id` int(11)) ENGINE=InnoDB
3172
+ SQL (0.000234) SHOW TABLES
3173
+ SQL (0.001507) CREATE TABLE `photos_tags` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `photo_id` int(11), `tag_id` int(11)) ENGINE=InnoDB
3174
+ SQL (0.000240) SHOW TABLES
3175
+ SQL (0.005050) CREATE TABLE `posts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255) DEFAULT '', `body` text) ENGINE=InnoDB
3176
+ SQL (0.000351) SHOW TABLES
3177
+ SQL (0.001632) CREATE TABLE `products` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3178
+ SQL (0.000289) SHOW TABLES
3179
+ SQL (0.004662) CREATE TABLE `projects` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB
3180
+ SQL (0.000346) SHOW TABLES
3181
+ SQL (0.001239) CREATE TABLE `somethings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB
3182
+ SQL (0.000305) SHOW TABLES
3183
+ SQL (0.005219) CREATE TABLE `tags` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3184
+ SQL (0.000347) SHOW TABLES
3185
+ SQL (0.001639) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
3186
+ SQL (0.000371) SHOW TABLES
3187
+ SQL (0.004785) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
3188
+ SQL (0.010121) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
3189
+ SQL (0.000560) SHOW TABLES
3190
+ SQL (0.000367) SELECT version FROM `schema_migrations`
3191
+ SQL (0.000430) INSERT INTO `schema_migrations` (version) VALUES ('12')
3192
+ SQL (0.000457) INSERT INTO `schema_migrations` (version) VALUES ('1')
3193
+ SQL (0.000336) INSERT INTO `schema_migrations` (version) VALUES ('2')
3194
+ SQL (0.000441) INSERT INTO `schema_migrations` (version) VALUES ('3')
3195
+ SQL (0.000325) INSERT INTO `schema_migrations` (version) VALUES ('4')
3196
+ SQL (0.000430) INSERT INTO `schema_migrations` (version) VALUES ('5')
3197
+ SQL (0.000356) INSERT INTO `schema_migrations` (version) VALUES ('6')
3198
+ SQL (0.000430) INSERT INTO `schema_migrations` (version) VALUES ('7')
3199
+ SQL (0.000322) INSERT INTO `schema_migrations` (version) VALUES ('8')
3200
+ SQL (0.000450) INSERT INTO `schema_migrations` (version) VALUES ('9')
3201
+ SQL (0.000343) INSERT INTO `schema_migrations` (version) VALUES ('10')
3202
+ SQL (0.000439) INSERT INTO `schema_migrations` (version) VALUES ('11')
3203
+ DEPRECATION WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files. See http://www.rubyonrails.org/deprecation for details. (called from send at /Library/Ruby/Gems/1.8/gems/rails-2.1.1/lib/initializer.rb:464)
3204
+ SQL (0.000187) SET SQL_AUTO_IS_NULL=0
3205
+ SQL (0.000436) SHOW TABLES
3206
+ SQL (0.000195) SELECT version FROM schema_migrations
3207
+ SQL (0.000094) SET SQL_AUTO_IS_NULL=0
3208
+ SQL (0.051843) DROP DATABASE IF EXISTS `resource_controller_test`
3209
+ SQL (0.000369) CREATE DATABASE `resource_controller_test` DEFAULT CHARACTER SET `utf8`
3210
+ SQL (0.000093) SET SQL_AUTO_IS_NULL=0
3211
+ SQL (0.000267) SHOW TABLES
3212
+ SQL (0.003062) CREATE TABLE `accounts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3213
+ SQL (0.000234) SHOW TABLES
3214
+ SQL (0.001544) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `post_id` int(11), `author` varchar(255), `body` text) ENGINE=InnoDB
3215
+ SQL (0.000226) SHOW TABLES
3216
+ SQL (0.004925) CREATE TABLE `images` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
3217
+ SQL (0.000294) SHOW TABLES
3218
+ SQL (0.001574) CREATE TABLE `options` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `product_id` int(11), `account_id` int(11), `title` varchar(255)) ENGINE=InnoDB
3219
+ SQL (0.000238) SHOW TABLES
3220
+ SQL (0.004714) CREATE TABLE `photos` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255), `account_id` int(11)) ENGINE=InnoDB
3221
+ SQL (0.000266) SHOW TABLES
3222
+ SQL (0.001606) CREATE TABLE `photos_tags` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `photo_id` int(11), `tag_id` int(11)) ENGINE=InnoDB
3223
+ SQL (0.000267) SHOW TABLES
3224
+ SQL (0.004614) CREATE TABLE `posts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255) DEFAULT '', `body` text) ENGINE=InnoDB
3225
+ SQL (0.000315) SHOW TABLES
3226
+ SQL (0.001526) CREATE TABLE `products` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3227
+ SQL (0.000260) SHOW TABLES
3228
+ SQL (0.005094) CREATE TABLE `projects` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB
3229
+ SQL (0.000315) SHOW TABLES
3230
+ SQL (0.007433) CREATE TABLE `somethings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB
3231
+ SQL (0.000314) SHOW TABLES
3232
+ SQL (0.001541) CREATE TABLE `tags` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3233
+ SQL (0.000347) SHOW TABLES
3234
+ SQL (0.004778) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
3235
+ SQL (0.000306) SHOW TABLES
3236
+ SQL (0.001443) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
3237
+ SQL (0.007848) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
3238
+ SQL (0.000408) SHOW TABLES
3239
+ SQL (0.000259) SELECT version FROM `schema_migrations`
3240
+ SQL (0.000394) INSERT INTO `schema_migrations` (version) VALUES ('12')
3241
+ SQL (0.000435) INSERT INTO `schema_migrations` (version) VALUES ('1')
3242
+ SQL (0.000329) INSERT INTO `schema_migrations` (version) VALUES ('2')
3243
+ SQL (0.000442) INSERT INTO `schema_migrations` (version) VALUES ('3')
3244
+ SQL (0.000325) INSERT INTO `schema_migrations` (version) VALUES ('4')
3245
+ SQL (0.000518) INSERT INTO `schema_migrations` (version) VALUES ('5')
3246
+ SQL (0.000400) INSERT INTO `schema_migrations` (version) VALUES ('6')
3247
+ SQL (0.000445) INSERT INTO `schema_migrations` (version) VALUES ('7')
3248
+ SQL (0.000330) INSERT INTO `schema_migrations` (version) VALUES ('8')
3249
+ SQL (0.000468) INSERT INTO `schema_migrations` (version) VALUES ('9')
3250
+ SQL (0.000342) INSERT INTO `schema_migrations` (version) VALUES ('10')
3251
+ SQL (0.000438) INSERT INTO `schema_migrations` (version) VALUES ('11')
3252
+ DEPRECATION WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files. See http://www.rubyonrails.org/deprecation for details. (called from send at /Library/Ruby/Gems/1.8/gems/rails-2.1.1/lib/initializer.rb:464)
3253
+ DEPRECATION WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files. See http://www.rubyonrails.org/deprecation for details. (called from send at /Library/Ruby/Gems/1.8/gems/rails-2.1.1/lib/initializer.rb:464)
3254
+ SQL (0.000194) SET SQL_AUTO_IS_NULL=0
3255
+ SQL (0.000467) SHOW TABLES
3256
+ SQL (0.000193) SELECT version FROM schema_migrations
3257
+ SQL (0.000162) SET SQL_AUTO_IS_NULL=0
3258
+ SQL (0.083048) DROP DATABASE IF EXISTS `resource_controller_test`
3259
+ SQL (0.000359) CREATE DATABASE `resource_controller_test` DEFAULT CHARACTER SET `utf8`
3260
+ SQL (0.000109) SET SQL_AUTO_IS_NULL=0
3261
+ SQL (0.000274) SHOW TABLES
3262
+ SQL (0.001971) CREATE TABLE `accounts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3263
+ SQL (0.000242) SHOW TABLES
3264
+ SQL (0.001439) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `post_id` int(11), `author` varchar(255), `body` text) ENGINE=InnoDB
3265
+ SQL (0.000261) SHOW TABLES
3266
+ SQL (0.022191) CREATE TABLE `images` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
3267
+ SQL (0.000306) SHOW TABLES
3268
+ SQL (0.007071) CREATE TABLE `options` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `product_id` int(11), `account_id` int(11), `title` varchar(255)) ENGINE=InnoDB
3269
+ SQL (0.000267) SHOW TABLES
3270
+ SQL (0.001667) CREATE TABLE `photos` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255), `account_id` int(11)) ENGINE=InnoDB
3271
+ SQL (0.000324) SHOW TABLES
3272
+ SQL (0.005277) CREATE TABLE `photos_tags` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `photo_id` int(11), `tag_id` int(11)) ENGINE=InnoDB
3273
+ SQL (0.000298) SHOW TABLES
3274
+ SQL (0.001706) CREATE TABLE `posts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255) DEFAULT '', `body` text) ENGINE=InnoDB
3275
+ SQL (0.000263) SHOW TABLES
3276
+ SQL (0.037609) CREATE TABLE `products` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3277
+ SQL (0.000410) SHOW TABLES
3278
+ SQL (0.001618) CREATE TABLE `projects` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB
3279
+ SQL (0.000267) SHOW TABLES
3280
+ SQL (0.005085) CREATE TABLE `somethings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB
3281
+ SQL (0.000284) SHOW TABLES
3282
+ SQL (0.001717) CREATE TABLE `tags` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3283
+ SQL (0.000338) SHOW TABLES
3284
+ SQL (0.037592) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
3285
+ SQL (0.000351) SHOW TABLES
3286
+ SQL (0.001574) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
3287
+ SQL (0.008445) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
3288
+ SQL (0.000626) SHOW TABLES
3289
+ SQL (0.000373) SELECT version FROM `schema_migrations`
3290
+ SQL (0.004179) INSERT INTO `schema_migrations` (version) VALUES ('12')
3291
+ SQL (0.000418) INSERT INTO `schema_migrations` (version) VALUES ('1')
3292
+ SQL (0.000469) INSERT INTO `schema_migrations` (version) VALUES ('2')
3293
+ SQL (0.000330) INSERT INTO `schema_migrations` (version) VALUES ('3')
3294
+ SQL (0.000448) INSERT INTO `schema_migrations` (version) VALUES ('4')
3295
+ SQL (0.000321) INSERT INTO `schema_migrations` (version) VALUES ('5')
3296
+ SQL (0.000450) INSERT INTO `schema_migrations` (version) VALUES ('6')
3297
+ SQL (0.000321) INSERT INTO `schema_migrations` (version) VALUES ('7')
3298
+ SQL (0.000452) INSERT INTO `schema_migrations` (version) VALUES ('8')
3299
+ SQL (0.000320) INSERT INTO `schema_migrations` (version) VALUES ('9')
3300
+ SQL (0.000450) INSERT INTO `schema_migrations` (version) VALUES ('10')
3301
+ SQL (0.000320) INSERT INTO `schema_migrations` (version) VALUES ('11')
3302
+ DEPRECATION WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files. See http://www.rubyonrails.org/deprecation for details. (called from send at /Library/Ruby/Gems/1.8/gems/rails-2.1.1/lib/initializer.rb:464)
3303
+ SQL (0.000186) SET SQL_AUTO_IS_NULL=0
3304
+ SQL (0.000406) SHOW TABLES
3305
+ SQL (0.000193) SELECT version FROM schema_migrations
3306
+ SQL (0.000105) SET SQL_AUTO_IS_NULL=0
3307
+ SQL (0.048688) DROP DATABASE IF EXISTS `resource_controller_test`
3308
+ SQL (0.000399) CREATE DATABASE `resource_controller_test` DEFAULT CHARACTER SET `utf8`
3309
+ SQL (0.000138) SET SQL_AUTO_IS_NULL=0
3310
+ SQL (0.000278) SHOW TABLES
3311
+ SQL (0.001683) CREATE TABLE `accounts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3312
+ SQL (0.000232) SHOW TABLES
3313
+ SQL (0.036525) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `post_id` int(11), `author` varchar(255), `body` text) ENGINE=InnoDB
3314
+ SQL (0.000298) SHOW TABLES
3315
+ SQL (0.001628) CREATE TABLE `images` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
3316
+ SQL (0.000239) SHOW TABLES
3317
+ SQL (0.005942) CREATE TABLE `options` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `product_id` int(11), `account_id` int(11), `title` varchar(255)) ENGINE=InnoDB
3318
+ SQL (0.000256) SHOW TABLES
3319
+ SQL (0.001805) CREATE TABLE `photos` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255), `account_id` int(11)) ENGINE=InnoDB
3320
+ SQL (0.000246) SHOW TABLES
3321
+ SQL (0.029334) CREATE TABLE `photos_tags` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `photo_id` int(11), `tag_id` int(11)) ENGINE=InnoDB
3322
+ SQL (0.000304) SHOW TABLES
3323
+ SQL (0.001556) CREATE TABLE `posts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255) DEFAULT '', `body` text) ENGINE=InnoDB
3324
+ SQL (0.000308) SHOW TABLES
3325
+ SQL (0.004759) CREATE TABLE `products` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3326
+ SQL (0.000308) SHOW TABLES
3327
+ SQL (0.001507) CREATE TABLE `projects` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB
3328
+ SQL (0.000301) SHOW TABLES
3329
+ SQL (0.005414) CREATE TABLE `somethings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `title` varchar(255)) ENGINE=InnoDB
3330
+ SQL (0.000329) SHOW TABLES
3331
+ SQL (0.001591) CREATE TABLE `tags` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255)) ENGINE=InnoDB
3332
+ SQL (0.000273) SHOW TABLES
3333
+ SQL (0.029274) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
3334
+ SQL (0.000366) SHOW TABLES
3335
+ SQL (0.001519) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
3336
+ SQL (0.009226) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
3337
+ SQL (0.001124) SHOW TABLES
3338
+ SQL (0.000385) SELECT version FROM `schema_migrations`
3339
+ SQL (0.000460) INSERT INTO `schema_migrations` (version) VALUES ('12')
3340
+ SQL (0.000491) INSERT INTO `schema_migrations` (version) VALUES ('1')
3341
+ SQL (0.000483) INSERT INTO `schema_migrations` (version) VALUES ('2')
3342
+ SQL (0.000349) INSERT INTO `schema_migrations` (version) VALUES ('3')
3343
+ SQL (0.000436) INSERT INTO `schema_migrations` (version) VALUES ('4')
3344
+ SQL (0.000337) INSERT INTO `schema_migrations` (version) VALUES ('5')
3345
+ SQL (0.000440) INSERT INTO `schema_migrations` (version) VALUES ('6')
3346
+ SQL (0.024000) INSERT INTO `schema_migrations` (version) VALUES ('7')
3347
+ SQL (0.000430) INSERT INTO `schema_migrations` (version) VALUES ('8')
3348
+ SQL (0.000457) INSERT INTO `schema_migrations` (version) VALUES ('9')
3349
+ SQL (0.000381) INSERT INTO `schema_migrations` (version) VALUES ('10')
3350
+ SQL (0.000441) INSERT INTO `schema_migrations` (version) VALUES ('11')