app/helpers/users_helper.rb
def user_name_login_email_id(user, search = nil)
        return '' if user.nil?
        result = ''
        result << ('' + h(user.name) + ' (') unless user.name.blank?
        result << (h(user.login))
        result << (', &lt;' + h(user.email) + '&gt;') unless user.email.blank?
        result << (')') unless user.name.blank?
        result.gsub!(search, '<strong class="highlight">' + search + '</strong>') unless search.blank?
        result << ( ' <snap class="user_id" style="display: none;">' + user.id.to_s + '</snap>' )
        return result
    end
#
# Use this to wrap view elements that the user can't access.
# !! Note: this is an *interface*, not *security* feature !!
# You need to do all access control at the controller level.
#
# Example:
# <%= if_authorized?(:index,   User)  do link_to('List all users', users_path) end %> |
# <%= if_authorized?(:edit,    @user) do link_to('Edit this user', edit_user_path) end %> |
# <%= if_authorized?(:destroy, @user) do link_to 'Destroy', @user, :confirm => 'Are you sure?', :method => :delete end %> 
#
#
Use this to wrap view elements that the user can't access.
Note: this is an *interface*, not *security* feature
You need to do all access control at the controller level.


Use this to wrap view elements that the user can ' t access . Note : this is an * interface * not * security * feature You need to do all access control at the controller level .
def user_name_login_email_id(user, search = nil)
        return '' if user.nil?
        result = ''
        result << ('' + h(user.name) + ' (') unless user.name.blank?
        result << (h(user.login))
        result << (', &lt;' + h(user.email) + '&gt;') unless user.email.blank?
        result << (')') unless user.name.blank?
        result.gsub!(search, '<strong class="highlight">' + search + '</strong>') unless search.blank?
        result << ( ' <snap class="user_id" style="display: none;">' + user.id.to_s + '</snap>' )
        return result
    end
def user_name_login_email_id ( user , search = nil ) return '' if user . nil? result = '' result << ( '' + h ( user . name ) + ' (' ) unless user . name . blank? result << ( h ( user . login ) ) result << ( ', &lt;' + h ( user . email ) + '&gt;' ) unless user . email . blank? result << ( ')' ) unless user . name . blank? result . gsub! ( search , '<strong class="highlight">' + search + '</strong>' ) unless search . blank? result << ( ' <snap class="user_id" style="display: none;">' + user . id . to_s + '</snap>' ) return result end
Use this to wrap view elements that the user can't access.
Use this to wrap view elements that the user can ' t access .
user
search