RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: jliang87
Thanks!!! The url shortener advice helped.
nm, fixed with http://stackoverflow.com/questions/14896468/blueimp-plugin-jquery-file-upload-how-to-use-the-fileinput-option-so-that-file
Actually, I found that the problem is that I have the edit form dynamically generated via ajax, so that the ".fileupload" can't pick up the form. "$('form').on 'fileupload', '#edit_painting', (event)->" doesn't do the trick.. How to bind custom functions to dynamically loaded elements?
I have a question: I cannot get this to work for the 'update' action. 'new' works fine, but I use the same code for 'update' and I always get a redirect with a "Template is missing" error for there's no 'update.html.erb', only 'update.js.erb', which has the same code as 'create.js.erb'.
If I add in the "respond_to" block with "format.js", it won't act out what's on 'create.js.erb' but rather do a full reload and shows the updated picture.
How can we get the same ajax upload to work with the 'update' action?
Somehow I get nil values for crop_x, crop_y, crop_w, and crop_h,
attr_accessible :name, :email, :password, :password_confirmation, :avatar,
:crop_x, :crop_y, :crop_w, :crop_h
attr_accessor :crop_x, :crop_y, :crop_w, :crop_h
already.. it shows correct values in the hidden text field and the after-save debug dump on browser, but cropping? ALWAYS evaluate to false!..
Anyone know why this is?
Thanks Yoda! I have this problem and also my postgres installation is kind of weird so was all messed. but thanks to you i can narrow down the prob and its now fixed!
thanks! ENV["DATABASE_URL"] = "postgres://localhost/mailer_development" doesn't work for me as well.
but i get "undefined method `load_functions' for QC::Queries:Module" when trying to migrate, why is this?