Class: ActionController::Base
- Inherits:
-
Object
- Object
- ActionController::Base
- Defined in:
- lib/facebooker/rails/facebook_pretty_errors.rb,
lib/facebooker/rails/facebook_url_rewriting.rb
Class Method Summary collapse
Instance Method Summary collapse
- #pretty_facebook_errors? ⇒ Boolean
- #rescues_path_with_facebooker(template_name) ⇒ Object
- #response_code_for_rescue_with_facebooker(exception) ⇒ Object
Class Method Details
.relative_url_root ⇒ Object
9 10 11 |
# File 'lib/facebooker/rails/facebook_url_rewriting.rb', line 9 def self.relative_url_root Facebooker.path_prefix end |
Instance Method Details
#pretty_facebook_errors? ⇒ Boolean
18 19 20 21 |
# File 'lib/facebooker/rails/facebook_pretty_errors.rb', line 18 def pretty_facebook_errors? Facebooker.facebooker_config['pretty_errors'] || (Facebooker.facebooker_config['pretty_errors'].nil? && RAILS_ENV=="development") end |
#rescues_path_with_facebooker(template_name) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/facebooker/rails/facebook_pretty_errors.rb', line 2 def rescues_path_with_facebooker(template_name) t = "#{RAILS_ROOT}/vendor/plugins/facebooker/templates/#{template_name}.erb" if pretty_facebook_errors? && File.exist?(t) t else rescues_path_without_facebooker(template_name) end end |
#response_code_for_rescue_with_facebooker(exception) ⇒ Object
12 13 14 |
# File 'lib/facebooker/rails/facebook_pretty_errors.rb', line 12 def response_code_for_rescue_with_facebooker(exception) pretty_facebook_errors? ? 200 : response_code_for_rescue_without_facebooker(exception) end |