RailsCasts Pro episodes are now free!

Learn more or hide this

Rajesh Rajappan's Profile

GitHub User: rajraj

Site: www.trant.co.uk

Comments by Rajesh Rajappan


Try this from the command line

convert -size 300x300 doc.pdf doc.jpg

Change the size and file names to suit.

Credit StackOverflow


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 }

where full_name is the attribute you want to search.

and then in the controller add

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