Created
March 4, 2012 15:04
-
-
Save daichirata/1973415 to your computer and use it in GitHub Desktop.
lokka_plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Lokka | |
module HelloGem | |
def self.registered(app) | |
app.get "/admin/plugins/hello_gem" do | |
haml view_path('test.haml'), :layout => :"admin/layout" | |
end | |
app.helpers do | |
def view_path(name) | |
view_path = File.expand_path(File.dirname(__FILE__) + "/path/to/view/#{name}") | |
File.open(view_path).read | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment