Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

J. Mark Locklear's Profile

GitHub User: marklocklear

Comments by J. Mark Locklear

Avatar

FYI, I was getting an error when I ran the migration file that was asking to specify an extension version for hstore. Turns out I did not have the postgres contrib module installed. You need to that to add the hstore extension to the postgres db. On Ubuntu I did 'sudo apt-get install postgresql-contrib-9.1'.

Avatar

Hey guys, two questions. First, can anyone point me to a good tutorial that would help with adding a 2nd application on the same server with a configuration like this. Second, lets say I wanted my app on Heroku to act as a staging app. Could you use a setup like this to pull from Heroku rather than Github?

Avatar

I'm wondering if anyone has ideas on turning a custom page into a pdf. I have a search page. I have a custom action in my controller that looks like this..

` ruby
   def search
    from_date = Date.new(params[:from_date][:year].to_i, params[:from_date][:month].to_i, params[:from_date][:day].to_i).to_s(:db)
    to_date = Date.new(params[:to_date][:year].to_i, params[:to_date][:month].to_i, params[:to_date][:day].to_i).to_s(:db)
    @visits = Visit.search(from_date, to_date, current_user)
      respond_to do |format|
        #format.html # show.html.erb
        format.pdf do
          pdf = Prawn::Document.new
          pdf.text @visits
          send_data pdf.render
        end
      end
  end

When I do this I get a "Completed 406 Not Acceptable". I've also tried to add a link_to to my view, and I get a different issue there. I've laid that out here. http://stackoverflow.com/questions/9381244/rails-3-passing-date-params-to-url Any help appreciated.