This file contains 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
# Create this new controller for registrations to check that they're not already registered | |
class RegistrationsController < Devise::RegistrationsController | |
def new | |
if (user_signed_in? || admin_signed_in?) | |
redirect_to '/', alert: "You cannot register two roles at the same time!" | |
else | |
super | |
end |
This file contains 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 class="left"> | |
<% if user_signed_in? %> | |
<li><%= link_to "Home Page", root_path %></li> | |
<% elsif admin_signed_in? %> | |
<li><%= link_to "Home Page", root_path %></li> | |
<li><%= link_to "Admin Home Page", admin_path %></li> | |
<% elsif company_user_signed_in? %> | |
<li><%= link_to "Home Page", root_path %></li> | |
<li><%= link_to "Company Home Page", company_path %></li> | |
<% else %> |
This file contains 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
#!/usr/bin/ruby | |
# | |
# This script fixes /usr/local only. | |
# | |
# 6th January 2010: | |
# Modified the script to just fix, rather than install. - rpavlik | |
# | |
# 30th March 2010: | |
# Added a check to make sure user is in the staff group. This was a problem | |
# for me, and I think it was due to me migrating my account over several |
This file contains 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
img { | |
cursor:pointer; | |
} |
This file contains 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
#fade { | |
width: 100px; | |
height: 100px; | |
border-radius: 50%; | |
border: none; | |
} |
NewerOlder