I have a time logger controller method that calls from my view, called `_embed_menu.html.erb`

```
<%= link_to l(:start_time_logger) + ' #' + @issue.id.to_s + ' ',
   {:controller => '/time_loggers', :action => 'start', :issue_id => @issue.id},
    :class => 'icon icon-start',
    :"data-replace" => '#time-logger-menu',
    :remote => true
%>

```

The part of 'start' method, where I shown an error:

```
      respond_to do |format|
        format.js{ flash[:error] = l(:start_time_expired_error)}
      end

```

Now to the part of the rendering flash messages. `application_helper.rb`
Have `render_flash_messages` function.

```
  def render_flash_messages
    s = ''
    flash.each do |k,v|
      s << content_tag('div', v.html_safe, :class => "flash #{k}", :id => "flash_#{k}")
    end
    s.html_safe
  end

```

and that function called on `base.html.erb` template.

```
<%= render_flash_messages %>

```

So the result - I launch a start method and flash shown only after I reload the page. I also tried to redirect with the hope that after this redirect the error will show.

```
redirect_to controller: 'issues', format: 'js'

```

but no result.

Maybe I can trigger re-rendering of <%= render\_flash\_messages %>?