Sha256: e5b165a58bcbddf9428e32656ee7bbd3b6abdc85ae85908ceb27f373da70fc5d

Contents?: true

Size: 569 Bytes

Versions: 3

Compression:

Stored size: 569 Bytes

Contents

create_file 'app/views/devise/menu/_login_items.html.haml' do
  <<-'FILE'
%div.pull-right{ style: "padding-top: 9px" }
  - if current_user.present?
    = link_to current_user.username, user_path(current_user)
    &nbsp; | &nbsp;

    - if current_user.admin?
      = link_to "admin", admin_root_path
      &nbsp; | &nbsp;

    = link_to "logout", destroy_user_session_path
  - else
    = link_to "login", new_user_session_path
  FILE
end

append_file 'app/views/shared/_header.html.haml' do
  <<-'FILE'
  %ul#user_nav
    = render 'devise/menu/login_items'
  FILE
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails-maker-0.1.11 templates/default/lib/authentication/header_login_items.rb
rails-maker-0.1.9 templates/default/lib/authentication/header_login_items.rb
rails-maker-0.1.7 templates/default/lib/authentication/header_login_items.rb