rfacebook 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -122,7 +122,9 @@ module RFacebook
122
122
 
123
123
  # SECTION: Helpful Methods
124
124
 
125
+ # DEPRECATED
125
126
  def facebook_redirect_to(url)
127
+ RAILS_DEFAULT_LOGGER.info "DEPRECATION NOTICE: facebook_redirect_to is deprecated in RFacebook, redirect_to works like any Rails app since 0.8.2"
126
128
  if in_facebook_canvas?
127
129
  render :text => "<fb:redirect url=\"#{url}\" />"
128
130
  elsif url =~ /^https?:\/\/([^\/]*\.)?facebook\.com(:\d+)?/i
@@ -218,6 +220,7 @@ module RFacebook
218
220
 
219
221
  def url_for(options={}, *params)
220
222
  # check options
223
+ options[:only_path] = true
221
224
  path = url_for__ALIASED(options, *params)
222
225
  if in_facebook_canvas? #TODO: or in_facebook_frame?)
223
226
  path = "#{path}/"
@@ -231,6 +234,16 @@ module RFacebook
231
234
 
232
235
  return path
233
236
  end
237
+
238
+ def redirect_to(options = {}, *parameters)
239
+ if in_facebook_canvas?
240
+ RAILS_DEFAULT_LOGGER.debug "** Canvas redirect to #{url_for(options)}"
241
+ render :text => "<fb:redirect url=\"#{url_for(options)}\" />"
242
+ else
243
+ RAILS_DEFAULT_LOGGER.debug "** Regular redirect_to"
244
+ redirect_to(options, *parameters)
245
+ end
246
+ end
234
247
 
235
248
  '
236
249
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: rfacebook
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.8.1
7
- date: 2007-08-06 00:00:00 -07:00
6
+ version: 0.8.2
7
+ date: 2007-08-07 00:00:00 -07:00
8
8
  summary: A Ruby interface to the Facebook API v1.0+ (F8 and beyond). Works with RFacebook on Rails plugin (see rfacebook.rubyforge.org).
9
9
  require_paths:
10
10
  - lib