class Madmin::ViewGenerator
Public Class Methods
template_source_path()
click to toggle source
# File lib/madmin/view_generator.rb, line 10 def self.template_source_path File.expand_path( "../../../app/views/madmin/application", __FILE__ ) end
Private Instance Methods
copy_resource_template(template_name)
click to toggle source
# File lib/madmin/view_generator.rb, line 23 def copy_resource_template(template_name) template_file = "#{template_name}.html.erb" copy_file( template_file, "app/views/#{namespace}/#{resource_path}/#{template_file}" ) end
namespace()
click to toggle source
# File lib/madmin/view_generator.rb, line 19 def namespace options[:namespace] end
resource_path()
click to toggle source
# File lib/madmin/view_generator.rb, line 32 def resource_path args.first.try(:underscore).try(:pluralize) || BaseResourcePath.new end