Displaying 20 results from an estimated 70000 matches similar to: "action call with a csv, but render html with flash"
2010 Jul 21
1
produce html flash message with csv action
How would I produce an HTML flash message on the screen if I call an
action.csv in the page?
--
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
2012 Mar 06
0
Devise/Cancan Signout User On Controller Action
I have implemented Devise for Authentication and Authorization in ROR
application everything seems fine but getting one issue. I have two
modals "Account" and "Transactiona" , and so two controllers
respectively.
My Transaction Index view call one of Account Controller method like
this
2008 Mar 20
0
Having trouble with a remote-crop-then-resize using attachment fu =(
Basically, I''m trying to crop multiple images out of a remote/original
scene.. Think flickr ''tagging'', only, the pixs in the tagged boxes
become their own unique images.. by way of simulating an upload from
the controller using attachment fu.. can''t quite figure out the
specific method in fu that would allow me to do this.. I''m so near the
edge right
2010 Aug 02
1
Any way around using only 1 render per action?
My program needs to use a render in a controller action. The problem
is that the action makes a user list and sends it to wicked_pdf, which
uses a render, causing an error if I use one also. Does anyone know a
way around this, and is the render I''m using totally necessary?? Here
is my controller code.
@households = Household.find(:all, :order => "last_name,
first_name")
2010 May 19
0
render html partial from atom builder
So I have an action that results in atom:
def index
...
respond_to do |format|
...
format.atom { render :layout => false}
end
end
Then I have a builder template to render the atom, called
index.atom.builder.
Inside this builder template, I''d like to render one of my existing html
partials, to put in the atom:content element, perfectly normal atom
thing to do.
2013 Feb 01
0
Add a customer renderer but I get missing template
Hi,
I''m trying to include the support of Msgpack<https://github.com/msgpack/msgpack-ruby> in
Rails 3.2 but when I try to return a mpac response, I get an error
concerning a missing template.
My renderer:
Mime::Type.register ''application/x-mpac'', :mpac
ActionController::Renderers.add :mpac do |mpac, options|
self.content_type ||= Mime::MPAC
2008 Sep 22
1
question about render
Hi there, i have a question respect to the "render"
when use render in the controller
def create
@contacto = Contacto.new(params[:contacto])
respond_to do |format|
if @contacto.save
flash[:notice] = ''Su Consulta ha sido enviada''
crear_correo(@contacto)
format.html { redirect_to(:action => :new) }
else
format.html
2011 Aug 28
3
rspec-rails render_views doesn't render layouts? / how to check flash isn't rendered
I''m trying to test that "static" pages (they''re ERB, but get cached),
generated through rails, don''t render any stray flash notices left over by
the authentication system (Devise) or wherever else.
I''ve tried writing this controller spec, but it appears that response.body
only renders the template, not its layouts?
describe "so that static
2006 Jul 03
1
flash[:notice] followed by render
Hi,
Sometimes I see action code like
def my_action
flash[:notice] = "Flash notice"
render
end
It is even in DHH''s new World of Resources slide show page 22. With
this use of flash before render, the user will see the flash for the
next two visible displays. Am I missing something?
Thanks,
Peter
2006 Apr 17
2
Understanding when flash gets reset (render vs. redirect_to)
All,
I have a controller action that will do a different "render (:action)"
call
depending on whether or not data is valid.
When the data is invalid - I set a flash element to hold a message.
However, when I post back to this controller action and have valid data,
I still have the flash element set, which I don''t want.
I believe this is because I did a render from the
2009 Jul 09
0
Cache expiration with format not working as expected
Hi all,
In my OrdersController, I have two actions completed and incomplete
that respond_to HTML and CSV.
Im also action caching these actions
..
caches_action :completed, :incomplete
...
def completed
@orders = Order.completed
respond_to do |format|
format.html
format.csv {render :layout => false}
end
end
def incomplete
@orders = Order.incomplete
respond_to do
2008 Jan 26
0
RSpec and resource_controller plugin
I just discovered James Golick''s resource_controller plugin
http://jamesgolick.com/resource_controller after spending another
stretch of boredom making the changes to nest yet another rails
resource controller. I''d actually slowed down this time to think
about what I was doing in hopes of automating the task.
I''ve tended to use script/generate rspec_scaffold to get
2008 Jul 29
0
handling multiple lookup tables in rails
I''ve got an application that will have a handful of lookup tables. To
be clear by this I mean tables that only have two attributes, id, name
and are used to provide drop-down lists for other tables/forms so that
these fields have "standard" values. I need 5 to 10 of these tables.
I''m a ruby/rails neophyte but I''ve read Agile Web Devel with
Rails, Rails
2006 Jun 28
0
ActiveResource (was: 1.1.3 available.)
2006/6/28, Paul Barry <mail@paulbarry.com>:
> Where can I find info about the "CRUD/resource-based features" that will be
> in 1.2.0?
In blogs. Especially about Railsconf and DHH''s keynotes.
In trunk : http://dev.rubyonrails.org/browser/trunk/activeresource
In DHH slides :
Transcription of some slides from DHH''s talk at RubyKaigi 2006
(I suppose it must
2011 May 25
0
Issues implementing jquery-form plugin for displaying image via an ajax call in my rails poc
Hello all,
I am trying to implement a POC wherein I can post a message + image and
get the same working via AJAX to display them both for each new entry
without the page reloading.
I am using a config of Ruby 1.8.7 and Rails 2.0.2 for project specific
purposes.. I am also using a pretty old paperclip commit from github for
this....I had to suit my proj config requirements mentioned previously..
2011 Feb 12
5
link_to a action in the controlles is not called
i have a link where it has to call a method defin in todoscontroller
named say_when but show is called
<td><%= link_to ''Say when'', todo, :action => :say_when ,
:remote => true %></td>
class TodosController < ApplicationController
# GET /todos
# GET /todos.xml
def index
@todos = Todo.all
respond_to do |format|
format.html #
2012 Jan 04
1
render :update problem with IE 9
Hi,
I have a legacy web site based on ruby on rails 3.0.9 which works just fine
with Firefox, chrome and IE 8, but I receive an HTTP 406 error every time
when I check the web site with Internet Explorer 9. I narrowed down the
problem to the respond_to + format.js + render :update trio, but I did not
manage to solve the problem until now.
I created a small example for reproduction:
The action
2010 Sep 27
6
Rails 3 + jQuery ; How to show error messages
Hi guys,
can anyone explain how to show error_messages_on (like back in Rails
2 , without Ajax) fields that didnt'' pass the validation the jquery
way.
I googled for about 2 hours now and found nothing. Jquery works fine
and adds the content to my table, but im totally stuck with the whole
error/validation thing.
My form looks like this:
<%= form_for Translation.new , :remote =>
2006 Jun 28
2
respond_to and Accept headers
After reading:
<http://www.loudthinking.com/arc/000572.html>
I''m trying to experiment with respond_to in order to not repeat myself
and create atom feeds out of a "browse" view.
In application controller I created a before filter that checks for the
extension of the current url and changes the accept header:
[code]
def check_headers
@headers["Accept"]
2010 Apr 14
1
Rails validations app specific problems
Hi all,
I have a unique workflow where it''s making the use of validations
difficult.
My app is for internal use in my company and I have a funky
implementation (inspired by the e-commerce Railscasts episodes) of a
cart. I have products which when I "add to cart" creates an order with a
state of "incomplete". The product is a line item of my order. Hope that
makes