Created
January 5, 2014 02:18
-
-
Save superlou/8263455 to your computer and use it in GitHub Desktop.
undefined method `image_url' for #<ImagesController:0x000000025ff6c0> on line 10 Solved: needed "resources images" in routes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ImagesController < ApplicationController | |
respond_to :json | |
def create | |
@image = Image.new | |
@image.user_id = params[:user_id] | |
@image.upload = params[:upload] | |
@image.save! | |
puts @image.upload.url | |
respond_with @image | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment