Sha256: 56466cda086f7ccb11c7947cd0048b80dbd8fe3db83d64f273e385b24b9cc4bf
Contents?: true
Size: 463 Bytes
Versions: 5
Compression:
Stored size: 463 Bytes
Contents
class PaperclipTemplateGenerator < Rails::Generator::Base def initialize(runtime_args, runtime_options = {}) super @model_name = @args[0] || "MyModel" @attachment_name = @args[1] || "MyAttachment" end def manifest record do |m| m.template "model.rb", "app/models/#{model_name.underscore}.rb" end end def model_name @model_name.singularize end def attachment_name @attachment_name.singularize end end
Version data entries
5 entries across 5 versions & 1 rubygems