class GuiderCms::Generators::ControllerGenerator

Public Instance Methods

copy_views() click to toggle source
# File lib/generators/guider_cms/controller_generator.rb, line 12
def copy_views
  view_directory :guider_cms
end

Protected Instance Methods

plural_scope() click to toggle source
# File lib/generators/guider_cms/controller_generator.rb, line 28
def plural_scope
  @plural_scope ||= scope.presence && scope.underscore.pluralize
end
target_path() click to toggle source
# File lib/generators/guider_cms/controller_generator.rb, line 24
def target_path
  @target_path ||= "app/controllers/"
end
view_directory(name, _target_path = nil) click to toggle source
# File lib/generators/guider_cms/controller_generator.rb, line 18
def view_directory(name, _target_path = nil)
  directory name.to_s, _target_path || "#{target_path}/#{name}" do |content|
    content
  end
end