Skip to content

Commit

Permalink
Merge pull request #117 from Dirble/layout-config
Browse files Browse the repository at this point in the history
Able to set layout
  • Loading branch information
yas4891 committed May 24, 2015
2 parents 75d51d1 + 3da3c8a commit 09fed7f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/koudoku/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Koudoku
class ApplicationController < ::ApplicationController
layout 'application'
layout Koudoku.layout
helper :application
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
Stripe.api_version = '2015-01-11' #Making sure the API version used is compatible.
# config.prorate = false # Default is true, set to false to disable prorating subscriptions
# config.free_trial_length = 30

# Specify layout you want to use for the subscription pages, default is application
config.layout = 'application'

# you can subscribe to additional webhooks here
# we use stripe_event under the hood and you can subscribe using the
Expand Down
7 changes: 7 additions & 0 deletions lib/koudoku.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ module Koudoku
mattr_accessor :prorate
@@prorate = true

mattr_accessor :layout
@@layout = nil

def self.webhooks_api_key=(key)
raise "Koudoku no longer uses an API key to secure webhooks, please delete the line from \"config/initializers/koudoku.rb\""
end
Expand Down Expand Up @@ -53,6 +56,10 @@ def self.owner_class
def self.free_trial?
free_trial_length.to_i > 0
end

def self.layout
layout
end


#
Expand Down

0 comments on commit 09fed7f

Please sign in to comment.