Skip to content

Instantly share code, notes, and snippets.

Will Xu 2bethere

Block or report user

Report or block 2bethere

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View explain.txt
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--+
| Explain |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--+
| Plan not optimized by CBO. |
|
View keybase.md

Keybase proof

I hereby claim:

  • I am 2bethere on github.
  • I am 2bethere (https://keybase.io/2bethere) on keybase.
  • I have a public key whose fingerprint is 57E4 7BAB 74E8 5677 594F 691D 9BD5 2F2A EE39 A0C3

To claim this, I am signing this object:

View gist:ed18869ac5dabff4dc68
### Keybase proof
I hereby claim:
* I am 2bethere on github.
* I am willxu (https://keybase.io/willxu) on keybase.
* I have a public key whose fingerprint is A207 8A94 907E 9F0F B8D4 EC39 5309 0493 D517 98FF
To claim this, I am signing this object:
@2bethere
2bethere / image.rb
Created May 23, 2014
Multiple file upload for Rails 4 params
View image.rb
class Image < ActiveRecord::Base
belongs_to :post
has_attached_file :file, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/:style/missing.png"
validates_attachment_content_type :file, :content_type => /\Aimage\/.*\Z/
end
You can’t perform that action at this time.