Sha256: ccf22cde6ba9a7a5e0a1976bbc852a811f46eba7dc729732ecfed3c997c80876
Contents?: true
Size: 824 Bytes
Versions: 15
Compression:
Stored size: 824 Bytes
Contents
class ActiveRecordTicketStoreGenerator < Rails::Generator::NamedBase def initialize(runtime_args, runtime_options = {}) runtime_args << 'create_active_record_ticket_store' if runtime_args.empty? super end def manifest record do |m| m.migration_template 'migration.rb', 'db/migrate', :assigns => { :session_table_name => default_session_table_name, :pgtiou_table_name => default_pgtiou_table_name } m.readme "README" end end protected def banner "Usage: #{$0} #{spec.name} [CreateActiveRecordTicketStore] [options]" end def default_session_table_name ActiveRecord::Base.pluralize_table_names ? 'session'.pluralize : 'session' end def default_pgtiou_table_name ActiveRecord::Base.pluralize_table_names ? 'cas_pgtiou'.pluralize : 'cas_pgtiou' end end
Version data entries
15 entries across 15 versions & 2 rubygems