Sha256: 9a654457c6af28c7c3140f94318983353d90475046d46e561080d1eb46c683d1

Contents?: true

Size: 264 Bytes

Versions: 23

Compression:

Stored size: 264 Bytes

Contents

module SimpleAuth
  module Helper
    # Renders the specified block for logged users.
    #
    #   <% when_logged do %>
    #     <!-- content for logged users -->
    #   <% end %>
    def when_logged(&block)
      capture(&block) if logged_in?
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
simple_auth-2.0.4 lib/simple_auth/helper.rb
simple_auth-2.0.3 lib/simple_auth/helper.rb
simple_auth-2.0.2 lib/simple_auth/helper.rb
simple_auth-2.0.1 lib/simple_auth/helper.rb
simple_auth-2.0.0 lib/simple_auth/helper.rb
simple_auth-1.5.0 lib/simple_auth/helper.rb
simple_auth-1.4.5 lib/simple_auth/helper.rb
simple_auth-1.4.4 lib/simple_auth/helper.rb
simple_auth-1.4.3 lib/simple_auth/helper.rb
simple_auth-1.4.2 lib/simple_auth/helper.rb
simple_auth-1.4.1 lib/simple_auth/helper.rb
simple_auth-1.4.0 lib/simple_auth/helper.rb
simple_auth-1.3.3 lib/simple_auth/helper.rb
simple_auth-1.3.2 lib/simple_auth/helper.rb
simple_auth-1.3.1 lib/simple_auth/helper.rb
simple_auth-1.3.0 lib/simple_auth/helper.rb
simple_auth-1.2.0 lib/simple_auth/helper.rb
simple_auth-1.1.0 lib/simple_auth/helper.rb
simple_auth-1.0.2 lib/simple_auth/helper.rb
simple_auth-1.0.1 lib/simple_auth/helper.rb