Class: Accountly::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/accountly/install_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#session_nameObject

Returns the value of attribute session_name.



8
9
10
# File 'lib/generators/accountly/install_generator.rb', line 8

def session_name
  @session_name
end

#user_nameObject

Returns the value of attribute user_name.



8
9
10
# File 'lib/generators/accountly/install_generator.rb', line 8

def user_name
  @user_name
end

Instance Method Details

#create_config_filesObject



28
29
30
# File 'lib/generators/accountly/install_generator.rb', line 28

def create_config_files

end

#create_controllersObject

übergeordneter Account-Controller



19
20
21
# File 'lib/generators/accountly/install_generator.rb', line 19

def create_controllers
  directory "controllers", "app/controllers"
end

#create_localesObject



23
24
25
26
# File 'lib/generators/accountly/install_generator.rb', line 23

def create_locales
  template "config/locales/de.yml", "config/locales/de.accountly.yml"
  template "config/locales/en.yml", "config/locales/en.accountly.yml"
end

#create_migrationObject



36
37
38
# File 'lib/generators/accountly/install_generator.rb', line 36

def create_migration
  migration_template 'db/migrate/add_new_email_to_users.rb', "db/migrate/add_new_email_to_users.rb"
end

#create_viewsObject



14
15
16
# File 'lib/generators/accountly/install_generator.rb', line 14

def create_views
  directory "views", "app/views/accountly"
end

#setup_routesObject



32
33
34
# File 'lib/generators/accountly/install_generator.rb', line 32

def setup_routes
  route "mount Accountly::Engine => '/account', :as => 'accountly_engine'"
end