Skip to content

Commit

Permalink
Removed old view helper deprecations, and some noise from README exam…
Browse files Browse the repository at this point in the history
…ples.
  • Loading branch information
grimen committed Feb 22, 2010
1 parent 8eb41ec commit ab0a289
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 28 deletions.
18 changes: 7 additions & 11 deletions README.textile
Expand Up @@ -16,7 +16,7 @@ h2. Dependencies

*You'll need:*

* *"devise 0.9.0+":http://github.com/plataformatec/devise* for authentication - based on "warden":http://github.com/hassox/warden/.
* *"devise 1.0.0":http://github.com/plataformatec/devise* for authentication - based on "warden":http://github.com/hassox/warden/.
* *"facebooker":http://github.com/mmangino/facebooker* for Facebook API integration.

*For Ruby 1.9 support:*
Expand Down Expand Up @@ -80,7 +80,7 @@ Note: The @--api@ and @--secret@ arguments only makes sense if you already got F

t.facebook_connectable

# optional: other devise modules
...

end
</pre>
Expand Down Expand Up @@ -192,16 +192,16 @@ In @app/views/layouts/application.html.*@, something like (showing only the rele
...or with explicit scope:

<pre>
<%= facebook_link :for => :customer %>
<%= facebook_link :customer %>
</pre>

...or even more explicit, something like:

<pre>
<% unless signed_in?(:user) %>
<%= facebook_sign_in_link :for => :user %>
<%= facebook_sign_in_link :user %>
<% else %>
<%= facebook_sign_out_link :for => :user %>
<%= facebook_sign_out_link :user %>
<% end %>
</pre>

Expand All @@ -217,7 +217,6 @@ etc.

def before_facebook_connect(fb_session)

# Just fetch what we really need from Facebook...
fb_session.user.populate(:locale, :current_location, :username, :name, :first_name, :last_name,
:birthday_date, :sex, :city, :state, :country)

Expand All @@ -237,14 +236,11 @@ etc.
self.profile.zip_code = fb_session.user.hometown_location.try(:state)
self.profile.country = fb_session.user.hometown_location.try(:country)

# etc...

...
end

def after_facebook_connect(fb_session)

# ...

...
end

end
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -21,7 +21,7 @@ begin
spec.files = FileList['[A-Z]*', File.join(*%w[{generators,lib,rails} ** *]).to_s]

spec.add_dependency 'activesupport', '>= 2.3.0'
spec.add_dependency 'devise', '>= 0.9.0'
spec.add_dependency 'devise', '1.0.0'
spec.add_dependency 'facebooker', '>= 1.0.55'
end
Jeweler::GemcutterTasks.new
Expand Down
16 changes: 0 additions & 16 deletions lib/devise_facebook_connectable/view_helpers.rb
Expand Up @@ -41,22 +41,6 @@ def facebook_link(*args)
end
end

# Deprecated in favor for +facebook_sign_in_link+.
#
def facebook_login_link(*args)
::ActiveSupport::Deprecation.warn("DEPRECATION:" <<
" facebook_login_link is deprecated. Use: facebook_sign_in_link.")
facebook_sign_in_link(*args)
end

# Deprecated in favor for +facebook_sign_in_link+.
#
def facebook_logout_link(*args)
::ActiveSupport::Deprecation.warn("DEPRECATION:" <<
" facebook_logout_link is deprecated. Use: facebook_sign_out_link.")
facebook_sign_out_link(*args)
end

# Agnostic Facebook Connect sign in/out (connect) button/link.
#
# *Case 1:* If Facebook account already connected to the app/site, this is same as
Expand Down

0 comments on commit ab0a289

Please sign in to comment.