Created
December 5, 2011 20:57
-
-
Save nu7hatch/1435306 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CurrentUser::GuestBoxCell < CurrentUser::ProfileBoxCell | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CurrentUser::ProfileBoxCell < Cell::Rails | |
helper FrontHelper | |
helper SessionsHelper | |
helper UsersHelper | |
build do |opts| | |
CurrentUser::GuestBoxCell unless logged_in? | |
end | |
def show | |
@user = parent_controller.current_user | |
render | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul id="guest_links"> | |
<li><%= hop_on_board_link %></li> | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul id="current_user_links"> | |
<li class="welcome">Welcome <%= link_to_user @user %></li> | |
<li><%= logout_link %></li> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment