Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Rajesh Rajappan's Profile

GitHub User: rajraj

Site: www.trant.co.uk

Comments by Rajesh Rajappan

Avatar

Try this from the command line

convert -size 300x300 doc.pdf doc.jpg

Change the size and file names to suit.

Credit StackOverflow

Avatar

If you haven't got an attribute called "name" add this to your to your model.

def as_json(options={})
    { :id => self.id, :name => self.full_name }
end

where full_name is the attribute you want to search.

and then in the controller add

format.json { render :json => @authors }