0

Because I'm running a rails app within Facebook's Iframe, I am restricted from using the Rails Session variable. I was able to successfully change my urls to include the would be session details as parameters in all of my url links by doing this:

src: default_url_options and rails 3

class ApplicationController < ActionController::Base

  #each url should pass the signed_request hash in params
  def default_url_options(options = {})
    if 2 == 3
     { :parsed_signed_request => @parsed_signed_request}
    end
  end
end

My question, however, is - how can I conditionally change my default URL only to effect certain actions and views. The current set-up causes errors on views that are not passed the @parsed_signed_request variable.

My Error looks like this: undefined method ``reverse_merge`` for nil:NilClass

There has to be a way to only do this on individual actions.

Community
  • 1
  • 1
E.E.33
  • 2,013
  • 3
  • 22
  • 34

1 Answers1

0

I think you want to return an empty hash if 2 does not equal 3.

Matt Fordham
  • 3,147
  • 10
  • 34
  • 51