Question on 'create_table' with limit option

at this
method(https://github.com/rails/rails/blob/08754f12e65a9ec79633a605e986d0f1ffa4b251/activerecord/lib/active_record/schema_migration.rb#L24)

limit is default to nil which mean it is optional argument, and few
lines
down version_options only adds limit when the limit is passed from the
argument.

and in this
method(https://github.com/rails/rails/blob/08754f12e65a9ec79633a605e986d0f1ffa4b251/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb#L241)
pass on the options to new_column_definition , and this
new_column_definition
method(https://github.com/rails/rails/blob/08754f12e65a9ec79633a605e986d0f1ffa4b251/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb#L295)
will try to fetch(:limit) which will raise exception.

Am wondering had I missing something ?

On 16 October 2014 12:49, Jin X. [email protected] wrote:

new_column_definition

method(rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb at 08754f12e65a9ec79633a605e986d0f1ffa4b251 · rails/rails · GitHub)

will try to fetch(:limit) which will raise exception.

Am wondering had I missing something ?

If fetch does not find the key then it runs the block.

Colin