axlsx_rails 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile +4 -4
- data/Gemfile.lock +89 -71
- data/Gemfile.lock.3.1 +45 -37
- data/Gemfile.lock.3.2 +79 -66
- data/Gemfile.lock.4.0 +108 -95
- data/README.md +84 -36
- data/lib/axlsx_rails/action_controller.rb +38 -7
- data/lib/axlsx_rails/version.rb +1 -1
- data/spec/axlsx_request_spec.rb +13 -8
- data/spec/ci.rb +9 -0
- data/spec/dummy/app/controllers/home_controller.rb +17 -2
- data/spec/dummy/app/controllers/likes_controller.rb +1 -1
- data/spec/dummy/app/mailers/notifier.rb +2 -14
- data/spec/dummy/app/models/like.rb +0 -2
- data/spec/dummy/app/models/user.rb +0 -1
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +8 -8
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +63 -0
- data/spec/dummy/log/test.log +347 -38723
- data/spec/dummy_4/README.rdoc +28 -0
- data/spec/dummy_4/Rakefile +6 -0
- data/spec/dummy_4/app/assets/javascripts/application.js +13 -0
- data/spec/dummy_4/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy_4/app/controllers/application_controller.rb +5 -0
- data/spec/dummy_4/app/controllers/home_controller.rb +54 -0
- data/spec/dummy_4/app/controllers/likes_controller.rb +18 -0
- data/spec/dummy_4/app/controllers/users_controller.rb +27 -0
- data/spec/dummy_4/app/helpers/application_helper.rb +2 -0
- data/spec/dummy_4/app/mailers/notifier.rb +14 -0
- data/spec/dummy_4/app/models/like.rb +3 -0
- data/spec/dummy_4/app/models/user.rb +10 -0
- data/spec/dummy_4/app/views/home/_cover_sheet.xlsx.axlsx +3 -0
- data/spec/dummy_4/app/views/home/index.html.erb +4 -0
- data/spec/dummy_4/app/views/home/index.xlsx.axlsx +8 -0
- data/spec/dummy_4/app/views/home/useheader.xlsx.axlsx +8 -0
- data/spec/dummy_4/app/views/home/withpartial.xlsx.axlsx +9 -0
- data/spec/dummy_4/app/views/layouts/application.html.erb +12 -0
- data/spec/dummy_4/app/views/likes/index.html.erb +17 -0
- data/spec/dummy_4/app/views/likes/index.xlsx.axlsx +7 -0
- data/spec/dummy_4/app/views/notifier/instructions.html.erb +14 -0
- data/spec/dummy_4/app/views/notifier/instructions.txt.erb +6 -0
- data/spec/dummy_4/app/views/users/index.html.erb +23 -0
- data/spec/dummy_4/app/views/users/index.xlsx.axlsx +1 -0
- data/spec/dummy_4/app/views/users/mailers/instructions.xlsx.axlsx +5 -0
- data/spec/dummy_4/app/views/users/respond_with.xlsx.axlsx +8 -0
- data/spec/dummy_4/bin/bundle +3 -0
- data/spec/dummy_4/bin/rails +4 -0
- data/spec/dummy_4/bin/rake +4 -0
- data/spec/dummy_4/config.ru +4 -0
- data/spec/dummy_4/config/application.rb +23 -0
- data/spec/dummy_4/config/boot.rb +5 -0
- data/spec/dummy_4/config/database.yml +25 -0
- data/spec/dummy_4/config/environment.rb +5 -0
- data/spec/dummy_4/config/environments/development.rb +37 -0
- data/spec/dummy_4/config/environments/production.rb +83 -0
- data/spec/dummy_4/config/environments/test.rb +39 -0
- data/spec/dummy_4/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy_4/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy_4/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy_4/config/initializers/inflections.rb +16 -0
- data/spec/dummy_4/config/initializers/mime_types.rb +4 -0
- data/spec/dummy_4/config/initializers/session_store.rb +3 -0
- data/spec/dummy_4/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy_4/config/locales/en.yml +23 -0
- data/spec/dummy_4/config/routes.rb +14 -0
- data/spec/dummy_4/config/secrets.yml +22 -0
- data/spec/dummy_4/db/migrate/20120717192452_create_users.rb +12 -0
- data/spec/dummy_4/db/migrate/20121206210955_create_likes.rb +10 -0
- data/spec/dummy_4/db/schema.rb +32 -0
- data/spec/dummy_4/db/test.sqlite3 +0 -0
- data/spec/dummy_4/log/test.log +4815 -0
- data/spec/dummy_4/public/404.html +67 -0
- data/spec/dummy_4/public/422.html +67 -0
- data/spec/dummy_4/public/500.html +66 -0
- data/spec/dummy_4/public/favicon.ico +0 -0
- data/spec/spec_helper.rb +8 -1
- data/spec/test_3.1.sh +1 -1
- data/spec/test_3.2.sh +1 -1
- data/spec/test_4.0.sh +2 -2
- metadata +149 -9
- data/Gemfile.lock.3.2.14 +0 -206
- data/Gemfile.lock.orig +0 -210
- data/spec/ci.sh +0 -2
data/README.md
CHANGED
@@ -18,70 +18,108 @@ gem 'axlsx_rails'
|
|
18
18
|
|
19
19
|
##Requirements
|
20
20
|
|
21
|
-
* Rails 3.1, tested on 3.1, 3.2, and 4.
|
21
|
+
* Rails 3.1, tested on 3.1, 3.2, and 4.1
|
22
|
+
* **As of 0.2.0 requires Axlsx 2.0.1, which requires rubyzip 1.0.0**
|
23
|
+
* As of Rails 4.1 you must use `render_to_string` to render a mail attachment.
|
22
24
|
|
23
25
|
##Usage
|
24
26
|
|
25
|
-
Axlsx-Rails provides a renderer and a template handler. It adds the
|
27
|
+
Axlsx-Rails provides a renderer and a template handler. It adds the `:xlsx` format and parses `.xlsx.axlsx` templates. This lets you take all the [Axlsx](https://github.com/randym/axlsx) code out of your controller or model and place it inside the template, where view code belongs! **See [this blog post](http://axlsx.blog.randym.net/2012/08/excel-on-rails-like-pro-with-axlsxrails.html) for a more complete walkthrough.**
|
26
28
|
|
27
29
|
###Controller
|
28
30
|
|
29
|
-
|
31
|
+
To use Axlsx-Rails set your instance variables in your controller and configure the response if needed:
|
30
32
|
|
31
33
|
```ruby
|
32
|
-
|
33
|
-
|
34
|
+
class ButtonController < ApplicationController
|
35
|
+
def action_name
|
36
|
+
@buttons = Button.all
|
37
|
+
respond_to do |format|
|
38
|
+
format.xlsx
|
39
|
+
end
|
40
|
+
end
|
34
41
|
end
|
35
42
|
```
|
36
43
|
|
37
|
-
|
44
|
+
###Template
|
45
|
+
|
46
|
+
Create the template with the `.xlsx.axlsx` extension (`action_name.xlsx.axlsx` for example.) [**Watch out for typos!**](#troubleshooting) In the template, use xlsx_package variable to create your spreadsheet:
|
38
47
|
|
39
48
|
```ruby
|
40
|
-
|
49
|
+
wb = xlsx_package.workbook
|
50
|
+
wb.add_worksheet(name: "Buttons") do |sheet|
|
51
|
+
@buttons.each do |button|
|
52
|
+
sheet.add_row [button.name, button.category, button.price]
|
53
|
+
end
|
54
|
+
end
|
41
55
|
```
|
42
56
|
|
43
|
-
|
57
|
+
This is where you place all your [Axlsx](https://github.com/randym/axlsx) specific markup. Add worksheets, fill content, merge cells, add styles. See the [Axlsx examples](https://github.com/randym/axlsx/tree/master/examples/example.rb) page to see what you can do.
|
58
|
+
|
59
|
+
That's it. Call your action and your spreadsheet will be delivered.
|
60
|
+
|
61
|
+
###Rendering Options
|
62
|
+
|
63
|
+
You can call render in any of the following ways:
|
44
64
|
|
45
65
|
```ruby
|
46
|
-
|
47
|
-
|
48
|
-
|
66
|
+
# rendered, no disposition/filename header
|
67
|
+
render 'buttons'
|
68
|
+
# rendered from another controller, no disposition/filename header
|
69
|
+
render 'featured/latest'
|
70
|
+
# template and filename of 'buttons'
|
71
|
+
render xlsx: 'buttons'
|
72
|
+
# template from featured controller, filename of 'latest'
|
73
|
+
render xlsx: 'featured/latest'
|
74
|
+
# template from another controller, filename of 'latest_buttons'
|
75
|
+
render xlsx: 'latest_buttons', template: 'featured/latest'
|
49
76
|
```
|
50
77
|
|
51
|
-
|
78
|
+
###Disposition
|
79
|
+
|
80
|
+
To specify a disposition (such as `inline` so the spreadsheet is opened inside the browser), use the `disposition` option:
|
81
|
+
|
82
|
+
```ruby
|
83
|
+
render xlsx: "buttons", disposition: 'inline'
|
84
|
+
```
|
85
|
+
|
86
|
+
If `render xlsx:` is called, the disposition defaults to `attachment`.
|
87
|
+
|
88
|
+
###File name
|
89
|
+
|
90
|
+
If Rails calls Axlsx through default channels (because you use `format.xlsx {}` for example) you must set the filename using the response header:
|
52
91
|
|
53
92
|
```ruby
|
54
93
|
format.xlsx {
|
55
|
-
|
94
|
+
response.headers['Content-Disposition'] = 'attachment; filename="my_new_filename.xlsx"'
|
56
95
|
}
|
57
96
|
```
|
58
97
|
|
59
|
-
|
60
|
-
render :filename 'blah.xlsx"
|
61
|
-
|
62
|
-
###Template
|
98
|
+
If you use `render xlsx:` the gem will try to guess the file name:
|
63
99
|
|
64
|
-
|
100
|
+
```ruby
|
101
|
+
# filename of 'buttons'
|
102
|
+
render xlsx: 'buttons'
|
103
|
+
# filename of 'latest_buttons'
|
104
|
+
render xlsx: 'latest_buttons', template: 'featured/latest'
|
105
|
+
```
|
65
106
|
|
66
|
-
|
107
|
+
If that fails, pass the `:filename` parameter:
|
67
108
|
|
68
109
|
```ruby
|
69
|
-
|
70
|
-
style_shout = wb.styles.add_style sz: 16, b: true, alignment: { horizontal: :center }
|
71
|
-
wb.add_worksheet(name: "Foobar") do |sheet|
|
72
|
-
sheet.add_row ['Bad', 'spellers', 'of', 'the', 'world', '...']
|
73
|
-
sheet.add_row ['Untie!']
|
74
|
-
sheet.merge_cells("B1:B6")
|
75
|
-
sheet["B1"].style = style_shout
|
76
|
-
end
|
110
|
+
render xlsx: "action_or_template", filename: "my_new_filename.xlsx"
|
77
111
|
```
|
78
112
|
|
113
|
+
###Acts As Xlsx
|
114
|
+
|
79
115
|
If you use [acts_as_xlsx](https://github.com/randym/acts_as_xlsx), configure the active record normally, but specify the package in the template:
|
80
116
|
|
81
117
|
```ruby
|
82
118
|
User.to_xlsx package: xlsx_package, (other options)
|
83
119
|
```
|
84
120
|
|
121
|
+
###Author
|
122
|
+
|
85
123
|
To set the author attribute upon Axlsx::Package.new, insert the following in application.rb:
|
86
124
|
|
87
125
|
```ruby
|
@@ -90,7 +128,7 @@ config.axlsx_author = "Elmer Fudd"
|
|
90
128
|
|
91
129
|
> NOTE: We really ought to allow the author to be set in each call
|
92
130
|
|
93
|
-
|
131
|
+
###Partials
|
94
132
|
|
95
133
|
Partials work as expected:
|
96
134
|
|
@@ -110,14 +148,14 @@ wb.add_worksheet(name: "Cover Sheet") do |sheet|
|
|
110
148
|
end
|
111
149
|
```
|
112
150
|
|
113
|
-
|
151
|
+
###Mailers
|
114
152
|
|
115
153
|
To use an xlsx template to render a mail attachment, use the following syntax:
|
116
154
|
|
117
155
|
```ruby
|
118
156
|
class UserMailer < ActionMailer::Base
|
119
157
|
def export(users)
|
120
|
-
xlsx =
|
158
|
+
xlsx = render_to_string handlers: [:axlsx], template: "users/export", locals: {users: users}
|
121
159
|
attachments["Users.xlsx"] = {mime_type: Mime::XLSX, content: xlsx}
|
122
160
|
...
|
123
161
|
end
|
@@ -127,14 +165,17 @@ end
|
|
127
165
|
If the template (`users/export`) can refer to only one file (the xlsx.axlsx template), you do not need to specify `handlers`.
|
128
166
|
|
129
167
|
##Troubleshooting
|
130
|
-
### Mispellings
|
131
|
-
It is easy to get the spelling wrong in the extension name, the format.xlsx statement, or in a render call. If you get the following error in particular:
|
132
168
|
|
133
|
-
|
134
|
-
|
135
|
-
|
169
|
+
###Mispellings
|
170
|
+
|
171
|
+
**It is easy to get the spelling wrong in the extension name, the format.xlsx statement, or in a render call.** Here are some possibilities:
|
136
172
|
|
137
|
-
it
|
173
|
+
* If it says your template is missing, check that its extension is `.xlsx.axlsx`.
|
174
|
+
* If you get the error `uninitialized constant Mime::XSLX` you have used `format.xslx` instead of `format.xlsx`, or something similar.
|
175
|
+
|
176
|
+
###What to do
|
177
|
+
|
178
|
+
If you are having problems, try to isolate the issue. Use the console or a script to make sure your data is good. Then create the spreadsheet line by line without Axlsx-Rails to see if you are having Axlsx problems. If you can manually create the spreadsheet, create an issue and we will work it out.
|
138
179
|
|
139
180
|
##Dependencies
|
140
181
|
|
@@ -154,6 +195,13 @@ it means you have used `format.xslx` instead of `format.xlsx`, or something simi
|
|
154
195
|
|
155
196
|
##Change log
|
156
197
|
|
198
|
+
**April 9, 2014**: 0.2.0 release
|
199
|
+
|
200
|
+
- Require Axlsx 2.0.1, which requires rubyzip 1.0.0
|
201
|
+
- Better render handling and testing, which might break former usage
|
202
|
+
- Rails 4.1 testing
|
203
|
+
- Mailer example update (**use render_to_string not render**)
|
204
|
+
|
157
205
|
**October 11, 2013**
|
158
206
|
|
159
207
|
- Handle (and test) respond_to override
|
@@ -8,17 +8,48 @@ ActionController::Renderers.add :xlsx do |filename, options|
|
|
8
8
|
formats[0] = :xlsx
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
#
|
12
|
+
# The following code lets you call a separate view without
|
13
|
+
# specifying a template:
|
14
|
+
#
|
15
|
+
# def called_action
|
16
|
+
# render pdf: 'diff_action'
|
17
|
+
# # or
|
18
|
+
# render pdf: 'controller/diff_action'
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
# You can always specify a template:
|
22
|
+
#
|
23
|
+
# def called_action
|
24
|
+
# render pdf: 'filename', template: 'controller/diff_action'
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
# And the normal use case works:
|
28
|
+
#
|
29
|
+
# def called_action
|
30
|
+
# render 'diff_action'
|
31
|
+
# # or
|
32
|
+
# render 'controller/diff_action'
|
33
|
+
# end
|
34
|
+
#
|
35
|
+
if options[:template] == action_name
|
36
|
+
if filename =~ /^([^\/]+)\/(.+)$/
|
37
|
+
options[:prefixes] ||= []
|
38
|
+
options[:prefixes].unshift $1
|
39
|
+
options[:template] = $2
|
40
|
+
else
|
41
|
+
options[:template] = filename
|
42
|
+
end
|
14
43
|
end
|
15
|
-
options[:template] = filename
|
16
44
|
|
17
45
|
disposition = options.delete(:disposition) || 'attachment'
|
18
|
-
|
19
|
-
|
46
|
+
if file_name = options.delete(:filename)
|
47
|
+
file_name += ".xlsx" unless file_name =~ /\.xlsx$/
|
48
|
+
else
|
49
|
+
file_name = "#{filename.gsub(/^.*\//,'')}.xlsx"
|
50
|
+
end
|
20
51
|
|
21
|
-
send_data render_to_string(options), :filename =>
|
52
|
+
send_data render_to_string(options), :filename => file_name, :type => Mime::XLSX, :disposition => disposition
|
22
53
|
end
|
23
54
|
|
24
55
|
# For respond_to default
|
data/lib/axlsx_rails/version.rb
CHANGED
data/spec/axlsx_request_spec.rb
CHANGED
@@ -93,14 +93,19 @@ describe 'Axlsx request', :type => :request do
|
|
93
93
|
@user = User.create name: 'Bugs', last_name: 'Bunny', address: '1234 Left Turn, Albuquerque NM 22222', email: 'bugs@bunny.com'
|
94
94
|
visit "/users/#{@user.id}/render_elsewhere.xlsx"
|
95
95
|
page.response_headers['Content-Type'].should == Mime::XLSX.to_s
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
96
|
+
[[1,false],[2,false],[3,true],[4,true],[5,false]].each do |s|
|
97
|
+
visit "/home/render_elsewhere.xlsx?type=#{s[0]}"
|
98
|
+
page.response_headers['Content-Type'].should == Mime::XLSX.to_s +
|
99
|
+
(s[1] ? "; charset=utf-8" : '')
|
100
|
+
File.open('/tmp/axlsx_temp.xlsx', 'w') {|f| f.write(page.source) }
|
101
|
+
wb = nil
|
102
|
+
expect{ wb = Roo::Excelx.new('/tmp/axlsx_temp.xlsx') }.to_not raise_error
|
103
|
+
if s[0] == 5
|
104
|
+
wb.cell(1,1).should == 'Bad'
|
105
|
+
else
|
106
|
+
wb.cell(2,2).should == 'Bugs'
|
107
|
+
end
|
108
|
+
end
|
104
109
|
end
|
105
110
|
|
106
111
|
it "uses respond_with" do
|
data/spec/ci.rb
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
if ENV['RAILS_VERSION'] =~ /^4/
|
4
|
+
puts "Testing Rails 4"
|
5
|
+
exit system('cd spec/dummy_4 && bundle install --without debug && bundle exec rake db:create && bundle exec rake db:migrate && cd ../../ && bundle exec rspec spec')
|
6
|
+
else
|
7
|
+
puts "Testing Rails 3"
|
8
|
+
exit system('cd spec/dummy && bundle install --without debug && bundle exec rake db:create && bundle exec rake db:migrate && cd ../../ && bundle exec rspec spec')
|
9
|
+
end
|
@@ -19,7 +19,22 @@ class HomeController < ApplicationController
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def render_elsewhere
|
22
|
-
|
22
|
+
case params[:type]
|
23
|
+
when '1'
|
24
|
+
render :xlsx => "home/index", :template => 'users/index'
|
25
|
+
when '2'
|
26
|
+
render :xlsx => "users/index"
|
27
|
+
when '3'
|
28
|
+
render template: "users/index"
|
29
|
+
when '4'
|
30
|
+
render "users/index"
|
31
|
+
else
|
32
|
+
render :xlsx => "index"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def render_file_path
|
37
|
+
render :xlsx => Rails.root.join('app','views','users','index')
|
23
38
|
end
|
24
39
|
|
25
40
|
def withpartial
|
@@ -31,7 +46,7 @@ class HomeController < ApplicationController
|
|
31
46
|
if params[:set_direct]
|
32
47
|
response.headers['Content-Disposition'] = "attachment; filename=\"filename_test.xlsx\""
|
33
48
|
else
|
34
|
-
render xlsx: "useheader",
|
49
|
+
render xlsx: "useheader", filename: "filename_test.xlsx"
|
35
50
|
end
|
36
51
|
}
|
37
52
|
end
|
@@ -1,26 +1,14 @@
|
|
1
1
|
class Notifier < ActionMailer::Base
|
2
2
|
default :from => 'noreply@company.com'
|
3
|
-
# default :from => "Didier Leser - CESAM Nature <didier.leser@cesam-nature.com>"
|
4
3
|
|
5
4
|
def instructions(user)
|
6
5
|
@user = user
|
7
6
|
|
8
7
|
# normal syntax
|
9
|
-
xlsx =
|
8
|
+
xlsx = render_to_string handlers: [:axlsx], template: 'users/mailers/instructions', layout: false
|
9
|
+
attachments["user_#{user.id}.xlsx"] = {mime_type: Mime::XLSX, content: xlsx}
|
10
10
|
|
11
|
-
# using render_to_string. sometimes not available, but why??
|
12
|
-
# xlsx = render_to_string handlers: [:axlsx], template: 'users/mailers/instructions', layout: false
|
13
|
-
|
14
|
-
# creating own view
|
15
|
-
# av = ActionView::Base.new()
|
16
|
-
# av.view_paths = ActionController::Base.view_paths
|
17
|
-
# av.extend ApplicationHelper
|
18
|
-
# av.assign user: @user
|
19
|
-
# xlsx = av.render handlers: [:axlsx], template: "users/mailers/instructions"
|
20
|
-
|
21
|
-
attachments["user_#{user.id}.pdf"] = {mime_type: Mime::XLSX, content: xlsx}
|
22
11
|
mail :to => user.email, :subject => 'Instructions'
|
23
12
|
end
|
24
13
|
|
25
|
-
|
26
14
|
end
|
@@ -58,7 +58,7 @@ module Dummy
|
|
58
58
|
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
59
59
|
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
60
60
|
# parameters by using an attr_accessible or attr_protected declaration.
|
61
|
-
config.active_record.whitelist_attributes =
|
61
|
+
config.active_record.whitelist_attributes = false
|
62
62
|
|
63
63
|
# Enable the asset pipeline
|
64
64
|
config.assets.enabled = true
|
File without changes
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -9,24 +9,24 @@
|
|
9
9
|
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
10
|
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
11
|
#
|
12
|
-
# It's strongly recommended
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:
|
14
|
+
ActiveRecord::Schema.define(version: 20121206210955) do
|
15
15
|
|
16
|
-
create_table "likes", :
|
16
|
+
create_table "likes", force: true do |t|
|
17
17
|
t.string "name"
|
18
18
|
t.integer "user_id"
|
19
|
-
t.datetime "created_at", :
|
20
|
-
t.datetime "updated_at", :
|
19
|
+
t.datetime "created_at", null: false
|
20
|
+
t.datetime "updated_at", null: false
|
21
21
|
end
|
22
22
|
|
23
|
-
create_table "users", :
|
23
|
+
create_table "users", force: true do |t|
|
24
24
|
t.string "name"
|
25
25
|
t.string "last_name"
|
26
26
|
t.string "address"
|
27
27
|
t.string "email"
|
28
|
-
t.datetime "created_at", :
|
29
|
-
t.datetime "updated_at", :
|
28
|
+
t.datetime "created_at", null: false
|
29
|
+
t.datetime "updated_at", null: false
|
30
30
|
end
|
31
31
|
|
32
32
|
end
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -763,3 +763,66 @@ Migrating to CreateLikes (20121206210955)
|
|
763
763
|
[1m[35m (2.0ms)[0m commit transaction
|
764
764
|
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
765
765
|
Connecting to database specified by database.yml
|
766
|
+
|
767
|
+
|
768
|
+
Started GET "/" for 127.0.0.1 at 2014-04-08 08:37:57 -0700
|
769
|
+
Connecting to database specified by database.yml
|
770
|
+
Processing by HomeController#index as HTML
|
771
|
+
Rendered home/index.html.erb within layouts/application (2.1ms)
|
772
|
+
Completed 200 OK in 8.8ms (Views: 8.4ms | ActiveRecord: 0.0ms)
|
773
|
+
|
774
|
+
|
775
|
+
Started GET "/" for 127.0.0.1 at 2014-04-08 08:38:06 -0700
|
776
|
+
Processing by HomeController#index as HTML
|
777
|
+
Rendered home/index.html.erb within layouts/application (0.4ms)
|
778
|
+
Completed 200 OK in 2.2ms (Views: 2.0ms | ActiveRecord: 0.0ms)
|
779
|
+
|
780
|
+
|
781
|
+
Started GET "/" for 127.0.0.1 at 2014-04-08 08:38:08 -0700
|
782
|
+
Processing by HomeController#index as HTML
|
783
|
+
Rendered home/index.html.erb within layouts/application (0.5ms)
|
784
|
+
Completed 200 OK in 3.1ms (Views: 2.8ms | ActiveRecord: 0.0ms)
|
785
|
+
|
786
|
+
|
787
|
+
Started GET "/useheader.xlsx" for 127.0.0.1 at 2014-04-08 08:38:22 -0700
|
788
|
+
Processing by HomeController#useheader as XLSX
|
789
|
+
Rendered home/useheader.xlsx.axlsx (8.8ms)
|
790
|
+
Completed 200 OK in 11.0ms (Views: 10.5ms | ActiveRecord: 0.0ms)
|
791
|
+
|
792
|
+
|
793
|
+
Started GET "/" for 127.0.0.1 at 2014-04-08 08:38:46 -0700
|
794
|
+
Processing by HomeController#index as HTML
|
795
|
+
Rendered home/index.html.erb within layouts/application (0.4ms)
|
796
|
+
Completed 200 OK in 2.4ms (Views: 2.0ms | ActiveRecord: 0.0ms)
|
797
|
+
|
798
|
+
|
799
|
+
Started GET "/useheader.xlsx" for 127.0.0.1 at 2014-04-08 08:38:51 -0700
|
800
|
+
Processing by HomeController#useheader as XLSX
|
801
|
+
Rendered home/useheader.xlsx.axlsx (8.4ms)
|
802
|
+
Completed 200 OK in 79848.3ms (Views: 10.9ms | ActiveRecord: 0.0ms)
|
803
|
+
|
804
|
+
|
805
|
+
Started GET "/" for 127.0.0.1 at 2014-04-08 08:47:01 -0700
|
806
|
+
Connecting to database specified by database.yml
|
807
|
+
Processing by HomeController#index as HTML
|
808
|
+
Rendered home/index.html.erb within layouts/application (1.7ms)
|
809
|
+
Completed 200 OK in 8.0ms (Views: 7.5ms | ActiveRecord: 0.0ms)
|
810
|
+
|
811
|
+
|
812
|
+
Started GET "/useheader.xlsx" for 127.0.0.1 at 2014-04-08 08:47:04 -0700
|
813
|
+
Processing by HomeController#useheader as XLSX
|
814
|
+
Rendered home/useheader.xlsx.axlsx (8.8ms)
|
815
|
+
Completed 200 OK in 7766.7ms (Views: 11.2ms | ActiveRecord: 0.0ms)
|
816
|
+
|
817
|
+
|
818
|
+
Started GET "/useheader.xlsx" for 127.0.0.1 at 2014-04-08 08:48:02 -0700
|
819
|
+
Processing by HomeController#useheader as XLSX
|
820
|
+
Rendered home/useheader.xlsx.axlsx (8.1ms)
|
821
|
+
Completed 200 OK in 1862.8ms (Views: 10.4ms | ActiveRecord: 0.0ms)
|
822
|
+
|
823
|
+
|
824
|
+
Started GET "/useheader.xlsx" for 127.0.0.1 at 2014-04-08 08:49:44 -0700
|
825
|
+
Connecting to database specified by database.yml
|
826
|
+
Processing by HomeController#useheader as XLSX
|
827
|
+
Rendered home/useheader.xlsx.axlsx (7.4ms)
|
828
|
+
Completed 200 OK in 3316.7ms (Views: 14.6ms | ActiveRecord: 0.0ms)
|