Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

jliang87's Profile

GitHub User: jliang87

Comments by

Avatar

Thanks!!! The url shortener advice helped.

Avatar

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?

Avatar

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?

Avatar

Somehow I get nil values for crop_x, crop_y, crop_w, and crop_h,

I've put
"
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?

Avatar

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!

Avatar

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?