Sha256: 53077d77ff2e34d69b2f5efdfc4b9b1944611a6627416ef9b96710fdefc5cc5d
Contents?: true
Size: 648 Bytes
Versions: 134
Compression:
Stored size: 648 Bytes
Contents
class FacebookPublisherGenerator < Rails::Generator::NamedBase def manifest record do |m| m.directory "app/models" m.template "publisher.rb", "app/models/#{file_name}_publisher.rb" migration_file_name="create_facebook_templates" # unless m.migration_exists?(migration_file_name) # THis should work, but it doesn't. So we re-implement it instead if Dir.glob(File.join(RAILS_ROOT,"db","migrate","[0-9]*_*.rb")).grep(/[0-9]+_create_facebook_templates.rb$/).blank? m.migration_template "create_facebook_templates.rb", "db/migrate", :migration_file_name=>migration_file_name end end end end
Version data entries
134 entries across 134 versions & 29 rubygems