0
Wenn ich den folgenden Befehl über mithilfe von Schienen laufen 5Rails nicht richtig polymorphe Modell erzeugen
rails g model Profile name:string:index profileable:references{polymorphic}
ich diese seltsame Migration bekam
class CreateProfiles < ActiveRecord::Migration[5.0]
def change
create_table :profiles do |t|
t.string :name
t.referencesc :profileable
t.referencesh :profileable
t.referencesi :profileable
t.referencesl :profileable
t.referencesm :profileable
t.referenceso :profileable
t.referencesp :profileable
t.referencesr :profileable
t.referencesy :profileable
t.timestamps
end
add_index :profiles, :name
end
end
env: OSX Sierra 10.12.2, Rails 5.0 0,1, Rubin 2.3.3p222 (2016.11.21 Revision 56859) [x86_64-darwin16]
verwenden Sie yadr? –
kann nicht reproduzieren funktioniert gut für mich –
@Denis Nicht wirklich, ich benutze prezto und tmux – Jarod