You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Essa gem padroniza o modo de trabalho das flash messages quando se usa o respond_with substituindo as seguintes lógicas:
defupdate@site=Site.find(params[:id])if@site.update(params[:site])flash[:success]="Atualizado com sucesso"elseflash[:error]="Erro ao atualizar"endresponde_with(@site)end
Com ela o respond_with já verifica se @site possui erro, se sim já gera um flash success e se falha já gera um flash error automaticamente, para customizar a mensagem basta customizar o locale.
Essa gem padroniza o modo de trabalho das
flash messages
quando se usa orespond_with
substituindo as seguintes lógicas:para
Com ela o respond_with já verifica se
@site
possui erro, se sim já gera umflash success
e se falha já gera umflash error
automaticamente, para customizar a mensagem basta customizar o locale.ref.: https://github.com/plataformatec/responders
The text was updated successfully, but these errors were encountered: