Sha256: b6e6812ac67c71b05b3c5a1b473587bc216fbad9b925d8a3348e078655395d69

Contents?: true

Size: 486 Bytes

Versions: 9

Compression:

Stored size: 486 Bytes

Contents

module SimpleNavigation
  module Adapters
    class Padrino < Sinatra
      def self.register(app)
        SimpleNavigation.set_env(::Padrino.root, ::Padrino.env)
        ::Padrino::Application.send(:helpers, SimpleNavigation::Helpers)
      end

      def link_to(name, url, options = {})
        context.link_to(name, url, options)
      end

      def content_tag(type, content, options = {})
        context.content_tag(type, content.html_safe, options)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
simple-navigation-4.4.0 lib/simple_navigation/adapters/padrino.rb
simple-navigation-4.3.0 lib/simple_navigation/adapters/padrino.rb
simple-navigation-4.2.0 lib/simple_navigation/adapters/padrino.rb
simple-navigation-4.1.0 lib/simple_navigation/adapters/padrino.rb
simple-navigation-4.0.5 lib/simple_navigation/adapters/padrino.rb
simple-navigation-4.0.4 lib/simple_navigation/adapters/padrino.rb
simple-navigation-4.0.3 lib/simple_navigation/adapters/padrino.rb
simple-navigation-4.0.2 lib/simple_navigation/adapters/padrino.rb
simple-navigation-4.0.1 lib/simple_navigation/adapters/padrino.rb