Type:
Module
Constants:

DEFAULT_ALIASES : { rails: { actions: '-a', orm: '-o', javascripts: '-j', javascript_engine: '-je', resource_controller: '-c', scaffold_controller: '-c', stylesheets: '-y', stylesheet_engine: '-se', template_engine: '-e', test_framework: '-t' }, test_unit: { fixture_replacement: '-r', } }

DEFAULT_OPTIONS : { rails: { assets: true, force_plural: false, helper: true, integration_tool: nil, javascripts: true, javascript_engine: :js, orm: false, resource_controller: :controller, resource_route: true, scaffold_controller: :scaffold_controller, stylesheets: true, stylesheet_engine: :css, test_framework: false, template_engine: :erb } }
RAILS_DEV_PATH : File.expand_path("../../../../../..", File.dirname(__FILE__))

We need to store the RAILS_DEV_PATH in a constant, otherwise the path can change in Ruby 1.8.7 when we FileUtils.cd.

RESERVED_NAMES : %w[application destroy plugin runner test]
assert_field_type
  • References/Ruby on Rails/Rails/Classes/Rails/Rails::Generators/Rails::Generators::Testing/Rails::Generators::Testing::Assertions

assert_field_type(attribute_type, field_type) Instance Public methods Asserts

2025-01-10 15:47:30
errors
  • References/Ruby on Rails/Rails/Classes/Rails/Rails::Generators/Rails::Generators::ActiveModel

errors() Instance Public methods POST create PATCH/PUT update

2025-01-10 15:47:30
on_conflict_behavior
  • References/Ruby on Rails/Rails/Classes/Rails/Rails::Generators/Rails::Generators::Actions/Rails::Generators::Actions::CreateMigration

on_conflict_behavior(&block) Instance Protected methods

2025-01-10 15:47:30
attributes_names
  • References/Ruby on Rails/Rails/Classes/Rails/Rails::Generators/Rails::Generators::NamedBase

attributes_names() Instance Protected methods

2025-01-10 15:47:30
run_generator
  • References/Ruby on Rails/Rails/Classes/Rails/Rails::Generators/Rails::Generators::Testing/Rails::Generators::Testing::Behaviour

run_generator(args=self.default_arguments, config={}) Instance Public methods Runs

2025-01-10 15:47:30
tests
  • References/Ruby on Rails/Rails/Classes/Rails/Rails::Generators/Rails::Generators::Testing/Rails::Generators::Testing::Behaviour/Rails::Generators::Testing::Behaviour::ClassMethods

tests(klass) Instance Public methods Sets which generator should be tested:

2025-01-10 15:47:30
index_helper
  • References/Ruby on Rails/Rails/Classes/Rails/Rails::Generators/Rails::Generators::NamedBase

index_helper() Instance Protected methods

2025-01-10 15:47:30
new
  • References/Ruby on Rails/Rails/Classes/Rails/Rails::Generators/Rails::Generators::AppBase/Rails::Generators::AppBase::GemfileEntry

new(name, version, comment, options = {}, commented_out = false) Class Public methods

2025-01-10 15:47:30
singular_table_name
  • References/Ruby on Rails/Rails/Classes/Rails/Rails::Generators/Rails::Generators::NamedBase

singular_table_name() Instance Protected methods

2025-01-10 15:47:30
class_name
  • References/Ruby on Rails/Rails/Classes/Rails/Rails::Generators/Rails::Generators::NamedBase

class_name() Instance Protected methods

2025-01-10 15:47:30