method

get_local_assigns

Importance_0
v2.0.3 - Show latest stable - 0 notes - Class: MigrationGenerator
get_local_assigns() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.