model
attributes # 返回哈希
哈希
merge! # 数据追加
migrate model
add_index :sessions, :user_id # 加索引 table_name colum_name
attributes # 返回哈希
merge! # 数据追加
add_index :sessions, :user_id # 加索引 table_name colum_name
本文标题:常用的 rails 方法
本文链接:https://www.haomeiwen.com/subject/fjqxcftx.html
网友评论