Removing :notice and
in Rails 3.1 app on page refresh

This might be an easy one for you guys, but I'm not sure the best way to achieve it. Is there some type of `.erb` I can write that asks "If `:notice` is present, then render..."? *Here's more about the issue:* My controller specifies a `:notice` for both the `create` and `update` actions (pretty standard). When I load the pages, the notices do as I'd expect and show up. When I reload the page however, (not sure why someone would do this, but I did), the `:notice` goes away (great, that's what I want), but the containing `
` remains. How do I go about ensuring that the encapsulating `
` is removed along with the `:notice`? I'm not sure what conditionals to specify in my view or maybe controller. The view looks something like this (btw, I'm using Twitter Bootstrap JS alerts). **View**

<%= notice %>

My **controller** is a single scaffolded model/resource with basic structure

以上就是Removing :notice and

in Rails 3.1 app on page refresh的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准