我正在尝试通过以下方式创建标记:
[14] pry(main)> Tag.create! {"phrase" => "here is my phrase" }
SyntaxError: unexpected tASSOC, expecting '}'
Tag.create! {"phrase" => "here is my phrase" }
^
[14] pry(main)> d = {"phrase" => "here is my phrase"}
=> {"phrase"=>"here is my phrase"}
[15] pry(main)> Tag.create! d ^
我不知道出了什么问题,但我无法让它发挥作用。知道我做错了吗?
THX
答案 0 :(得分:0)
Tag.create!({“词组”=>“这是我的短语”})
答案 1 :(得分:0)
试试这个
Tag.create {:phrase => “这是我的短语”}