similar to: Flash error not showing

Displaying 20 results from an estimated 200000 matches similar to: "Flash error not showing"

2006 Jan 25
1
Flash CSS issues
I''m have issues in IE6 with my CSS for my flash[:notice] and flash[:error]. My CSS is as follows (basically copied from backpack''s CSS file for testing purposes): #Flash { text-align: left; border: 1px solid #ccc; padding: 5px 5px 5px 30px; font-size: 14px; margin: 0 auto 12px auto; margin-right: 7px; } .login #Flash { margin-top: 12px; font-size:
2006 Jan 09
3
Custom flash[:notice]
For the most part, my flash[:notice] messages fall into one of two categories: either a message stating that something happened successfully (which is colored green), or messages showing errors (which I would like to be red). Is it possible to set some sort of flag on these messages to choose which color I want to show, or would I need to base it on CSS and set the class in the text, i.e.
2007 May 09
3
flash CSS styling
I realize this is a CSS question, and not a rails question, so forgive the off-topicness, but I thought rails users might have some experience with this... In my app I typically set one of two flash messages to inform users on the sucess/failure of their actions. Ethier flash[:message] or flash[:error] will be set. I want this to appear in the same place as part of my site layout every time, so
2006 May 10
0
Ezra''s acl_system2 and flash not getting populated in functional tests
Hi all, I am using the LoginGenerator and Ezra''s acl_system2 to protect certain actions in my controllers. I have written some functional tests to check for correct handling of redirects, flashes, etc. The flashes however only get populated on the first get action in any given test. Here is what I have so far: In the controller: class PageController < AC before_filter
2007 Oct 08
2
flash messages?
Hello, I''m using flash[:hash] in my application, and I feel like I''m forced to make a redirect just to be sure that flash[:hash] doesn''t appear in any other views? flash[:notice] = "ASDDD" redirect_to :action => :another_method_name else flash[:error] = "DSADS" redirect_to :action => :same_method_name How do you solve this problem, to be
2006 May 26
1
flash.keep not working with render_component
Using Rails 1.1.2 and ruby 1.8.4 I''m having a weird issue with the flash when using render_component for an action inside different controller than the one from which you render. I''m passing an object via flash across a couple of actions (new and create) behind the scenes using flash.keep(:object). It works fine if the component I''m rendering is in the same
2006 Apr 27
7
RJS & Ajax question...
Hi, I''m trying to convert an older Rails application to use Ajax. I''ve already moved my edit and show actions so that, instead of displaying as separate pages, they appear in a <div> on my list view. However, I have two problems: 1) When the user saves the changes, I want to put all the ajax changes in an RJS template. However, form_remote_tag :url =>{:action =>
2006 Feb 20
2
Problem with flash[:notice] appearing twice
In my save function in my (ajax!!!) controller, i''ve got a bit like this: if ... flash[:notice] = ''NOT SAVED: This month is locked'' render :partial => ''edit'' else save it... redirect to ''show'' action.... ... If i try to save an entry for a locked month, it correctly brings me back to my edit action with the
2007 Mar 22
1
Functional test and flash with an error
I''m getting this error thats moaning about expected tag, but no tag found matching {:content=>"User James Apps was successfully created.", :attributes=>{:id=>"notice"}, :tag=>"div"} in the file application.rb. I tried using a regular expression - /#{user.first_name}/ , but that wouldn''t work either user_controller_test.rb 1) Failure:
2006 Nov 04
0
weird problem with content type
Hey all, My site is working ok except for a page that displays as text instead of html. I tried to use this: puts "Content-Type: text/html" then it display the page as html normally but I still get that ugly part on top of my page: Content-Type: text/html Set-Cookie: _session_id=6356b18a24d56a0da01bfab791fa911d; path=/ Status: 200 OK Cache-Control: no-cache here is the url:
2006 May 02
2
flash not shown
I am using the following code (inspired by one of the books) to check if the user''s session should have timed out. # Check to see if the user has been inactive for longer than the # expiry period. If they have, reset the session. def check_timeout if session[:expires_at] != nil @time_left = (session[:expires_at] - Time.now).to_i unless @time_left > 0
2014 May 21
0
kernel: NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out
Hi, anybody know how to fix this. May 20 12:16:15 wolfpac kernel: NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out May 20 12:16:15 wolfpac kernel: Modules linked in: pf_ring(U) af_key iptable_nat ipt_LOG iptable_filter ip_tables nf_conntrack_ipv6 nf_defrag_ipv6 xt_state ip6t_LOG xt_limit ip6table_filter ip6_tables bridge stp llc nf_nat_ftp nf_nat nf_conntrack_ipv4 nf_defrag_ipv4
2009 May 13
4
Setting flash notice via javascript?
I am using a javascript to redirect to another action. Is there a way to set the flash [:notice] in the javascript? So when the javascript redirects, the new action/view picks up the flash[:notice]? (I suspect I may have to do something like url?notice=.....) ideas? thanks.
2006 Aug 04
4
DRY DRY DRY
Hello everyone! Ive been on rails for the last month or so and really enjoyed this framework. However its very hard to find documentation on how to do things right! For example every beginner after a while realizes that having similar CRUD actions in every controller and views for them is not DRY at all! Few days ago I found http://dereksivers.com/rails-shared-controller.html I quite like his
2006 Mar 11
1
how to test flash.now?
Hi gurus How to test that controller actions sets flash.now[:info] I cannot test it from standard functional TestCase since it is eradicated after action execution. Standard flash hash can be tested freely within TestCase... Eg. flash[:info] Thanks in advance Szczepiq
2010 Mar 24
3
flash error & fade away
this is my current code: #notice { border: solid 1px #99cc99; background-color: #e2f9e3; color: #006600; padding: 5px; margin-bottom: 5px; } #notice.error { border-color: #e2f9e3; background-color: #eeaaaa; color: #cc0000; } <% flash.each do |key, msg| %> <%= content_tag :div, flash[:error] || flash[:notice], :id => ''notice'', :class =>
2006 Jan 13
4
Flash not cleared with ActiveRecord session store
Cheers, I''ve stumbled over a bug with 1.0 and ActiveRecord store for session while migrating from pstore sessions. I created the table with `rake create_sessions_table` and set `config.action_controller.session_store = :active_record_store` in environment.rb. Everything runs fine except that the flash messages will not be cleared. I get the same message everytime on everypage I
2008 May 20
3
Flash message not shown after redirected by verify
I have the following snippet in a controller. verify :params => "post", :only => [:create, :update, :destroy], :add_flash => {"notice" => "Invalid Access"}, :redirect_to => {:action => ''list''} If I directly access /posts/create by typing URL (GET), the program redirects to the "list" action, but the flash message I
2013 Jun 16
0
Monkey patching a gem's controller method
I want to change the keys Devise is using in flash alerts. (Devise uses :notice and :alert flash keys, but I want to change them to :success and :error so that I can display nice green/red boxes with Bootstrap.) To that end, I want to monkey patch the `set_flash_message` method in
2009 Sep 28
2
Error with flash and form_authenticity_token in new rails application with scaffolding
Hi All, I get this strange problem with newly scaffolded apps - I''d really appreciate any help in this regard. /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ active_support/message_verifier.rb:46:in `block in secure_compare'' /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/ active_support/message_verifier.rb:45:in `each''