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

Version Path
rubycas-client-2.3.10.rc1 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
rubycas-client-2.3.9 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
rubycas-client-2.3.9.rc1 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
rubycas-client-2.3.8 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
rubycas-client-2.3.7 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
rubycas-client-2.3.6 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
rubycas-client-2.3.5 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
rubycas-client-2.3.3 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
rubycas-client-2.3.2 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
rubycas-client-2.3.1 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
rubycas-client-2.3.0.rc1 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
vibes-rubycas-client-2.3.0.alpha8 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
vibes-rubycas-client-2.3.0.alpha7 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
vibes-rubycas-client-2.3.0.alpha6 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb
vibes-rubycas-client-2.3.0.alpha5 rails_generators/active_record_ticket_store/active_record_ticket_store_generator.rb