这是有效的Elixir语法吗?

时间:2017-10-17 16:17:50

标签: elixir

因此,查看此file中的源代码,我会看到一个向后指向的箭头,如pid <- {:message, message, m}。这是有效的Elixir语法吗?当我将RingOne模块粘贴到iex shell中时,现在有什么有效的语法才能使 def create @album = Album.new(album_params) respond_to do |format| if @album.save format.html { redirect_to @album, notice: 'Album was successfully created.' } format.json { render :show, status: :created, location: @album } else format.html { render :new } format.json { render json: @album.errors, status: :unprocessable_entity } end end end def album_params params.require(:album).permit(:title) end 模块正常运行?

1 个答案:

答案 0 :(得分:3)

是的,!运算符已被弃用,支持send/2 in 2014removed a few days later。修复起来很简单:只需将所有a <- b表达式更改为send(a, b)