Permalink
Browse files

proper support of long user roles

  • Loading branch information...
1 parent 914a4eb commit 410a251491d8dbc8db775c58df2ec52311db55d4 @gshilin gshilin committed May 18, 2012
@@ -28,9 +28,11 @@ body {
.brand-user {
font-size: 14px;
font-weight: normal;
+ letter-spacing: 0;
}
}
ul.nav {
+ clear: left;
li {
a {
color: rgba(255, 255, 255, 0.8);
@@ -47,8 +49,6 @@ body {
}
}
}
-
-
}
}
@@ -2,10 +2,10 @@
.navbar-inner
.container
- if current_user
- - user = "<span class='brand-user'>#{current_user.email}(#{current_user.roles.collect{|r| r.name}.join(', ')})</span>".html_safe
+ - user = "<span class='brand-user'>#{current_user.email}(#{current_user.roles.collect{|r| r.name}.join(', ').truncate(40)})</span>".html_safe
- else
- user = ''
- =link_to "KMedia Admin #{user}".html_safe, '#', :class => 'brand'
+ =link_to "KMedia Admin <br/>#{user}".html_safe, '#', :class => 'brand'
= link_to_if current_user, 'Logout', destroy_user_session_path, :class => 'brand logout'
- if current_user
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+ wrap_parameters format: [:json]
+end
+
+# Disable root element in JSON by default.
+ActiveSupport.on_load(:active_record) do
+ self.include_root_in_json = false
+end

0 comments on commit 410a251

Please sign in to comment.