similar to: produce html flash message with csv action

Displaying 20 results from an estimated 80000 matches similar to: "produce html flash message with csv action"

2010 Jul 23
0
action call with a csv, but render html with flash
Does anyone know how to get an action call with csv to render html with flash? I can get it to work locally but when I upload to the server it keeps trying to render a csv file with the html inside it. unless flash[:error].blank? render :template => ''/report/action'' and return @content_type = ''text/html'' respond_to do |format|
2010 Jul 15
3
aasm manage states
Is there a way to manage the states in AASM by keeping them in a table to normalize the data? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2010 Aug 17
3
Rails 3 flash message problems
The following code in my application_helper.rb class either eats the flash message or escapes it and does not display properly: # Outputs the corresponding flash message if any are set def flash_messages messages = [] %w(notice warning error).each do |msg| messages << content_tag(:div, content_tag(:p, html_escape(flash[msg.to_sym])), :class => "message
2009 Dec 06
3
link_to_function or button_to_function memory usage
I have an full ajax app doing crud operations for contact info for one section. I was using ajax calls to edit and cancel and also to add a contact. I am implementing a button_to_function instead of doing an ajax call to just edit/add/or cancel a contact. I am running into a memory issue using the button_to_function or link_to_function. I have this: <%= link_to_function ''Edit
2010 Jul 23
7
fail rollback transaction with manual raise exception
With : PostgreSQL 8.4 or postgresql-8.3 rails 2.3.4 pg 9.x or pg 8.x I test this code: ========================= class NkiBatch < ActiveRecord::Base Bank.connection.transaction do bank = Bank.new(:name => "ddsjdsjdsjk") bank.save! raise ActiveRecord::Rollback.new end end and this: ========================= class NkiBatch < ActiveRecord::Base
2010 Apr 15
3
Same model over multiple databases problem
Hello, I run many gameservers (about 10), each gameserver has a different database and all gameserver''s databases has the table "players" which is associated to the model Player. So every time I want to work with the Player model I need connect to a different database depending on which gameserver I am working on. My problem is that I need to make rails choose which database
2011 May 03
2
Database performance for polymorphic associations under high load
Hey guys, I''ve been thinking lately about polymorphic associations, and I wonder: is there a noticeable or tangible performance "hit" from doing polymorphic associations when you''ve got your database under really high query load? So for example, maybe I have a "message" model, a "user" model and an "administrator" model, without any
2012 Sep 10
5
flash[:notice] not working
Hi, anybody please help me out,am using rails 3 but using this flash[:notice] doesnot works, i have used this in controllers. any idea ? please help. Regards, Manoj -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2011 May 06
5
write object array value to csv file
I have an object array @keywords = Keyword.find_by_sql(sql). Now I need to write all values of @keywords to a csv file, and because the sql statement is dynamically generated, hence the attribute names are dynamic too. How can I do it? Please help! Thanks! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on
2010 Jun 23
2
CSV Upload Issue
CSV: http://pastie.org/1015772 Controller: http://pastie.org/1015773 Why is it that it''s only saving the record for "EFG5"? I''m obviously missing something. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2010 Dec 20
1
Writing to a CSV with Faster::CSV
Is there a way to write a csv file using a hash instead of an array? Something like this: header_keys = :first_name, :last_name, :email FasterCSV.open("path/to/file.csv", "w") do |csv| User.all.do |user| csv << user end end Thanks... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2011 Aug 03
2
Malformed CSV Error
Hello, I am getting error :- #<CSV::MalformedCSVError: Unclosed quoted field on line 1892.>. I have following code :- -------------------------------------------------- @parsed_file = CSV.open("#{RAILS_ROOT}/private/sales_report_files/#{@file_folder}/#{@sub_file_folder}/#{@file_name.filename}",''r'',:col_sep =>?\t) @parsed_file.each_with_index do |row, index|
2010 Aug 18
6
Once I added this HABTM, one of my 'through' relationships, on a non-habtm model, seems to have broke?
I''m a rails newb and have been Googling about this, but I''m still stumped. Not showing everything here, but basically it should be a pretty common setup so I''m sure others know what I''m doing wrong. - A meter can belong to many meter_groups - A meter_group can have many meters. - A user can ''subscribe'' to viewing a meter_group (Subscription)
2010 Apr 13
5
params[hash] and link_to.... easy question... but I am stupid :)
routes.rb map.connect '':controller/:action/:id/:draw_id'', :controller => "admin", :action => "edit_position" In a view I have: <%= link_to "#{@draw.positions[0].team}", { :controller => :admin, :action => :edit_position, :id =>@draw.positions[0].id, :draw_id =>
2011 Jan 24
3
CSV::parse with named columns error on Heroku
The following code works locally (parsing a CSV with specific headers) but when on Heroku I get the following error on the ''next if'' row: TypeError (can''t convert String into Integer) CSV.parse(File.open(file_path, ''r'').read.gsub(/"/, ''''), :headers => true) do |row| next if row[''Customer'']
2013 Jan 15
7
javascript flash messages gem?
Does anybody knows a gem for managing flash messages? I would want to add messages to the flash div in the client. Bootstrap support is a plus. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group,
2010 Mar 30
2
setting up has_many
Do I have to manually set a column in a dependent table for the id of the object to which it belongs? I have a collection of objects called photos that are owned by a analysis object. When I try to show an attribute of each of the photo objects I get this error: Mysql::Error: Unknown column ''photos.analysis_id'' in ''where clause'': SELECT * FROM `photos` WHERE
2009 Nov 25
1
unable to add the flash player helper
hi i am trying to add the flash player helper on applicaion. when i install the the svn i got this error how to solve this? # ruby script/plugin install svn://rubyforge.org/var/svn/flashplayrhelpr svn: Can''t connect to host ''rubyforge.org'': Connection refused and also i try this # rake flash_player:install (in /home/malathi/www/videoapp) rake aborted!
2013 Nov 08
2
Export CSV
Hi friends, i am using csv export on my application. in my view file code is <%- headers = ["Transaction ID", "Activity ID", "Product Name","Customer Name", "Ticket code"] -%> <%= CSV.generate_line(headers).strip %> <%if !@trans.nil? && @trans.length > 0 %> <% @trans.each do |tran|%> <% if
2011 May 19
3
Cookie Overflow at CSV import
Hi I have a form for importing a csv file. With every entry in my CSV I do a delayed background call from a webservice and the result is then saved to my database. This is working great! Now I tried a CSV file with over 400 rows. After clicking import in my form it takes some time and then I get the following error message: ''ActionDispatch::Cookies::CookieOverflow''. But