method

get_local_assigns

rails latest stable - Class: MigrationGenerator

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

get_local_assigns()
private

No documentation available.

# File railties/lib/rails_generator/generators/components/migration/migration_generator.rb, line 10
    def get_local_assigns
      returning(assigns = {}) do
        if class_name.underscore =~ /^(add|remove)_.*_(?:to|from)_(.*)/
          assigns[:migration_action] = $1
          assigns[:table_name]       = $2.pluralize
        else
          assigns[:attributes] = []
        end
      end
    end