Thanks i resolved the problem it was a shit that i was programming.
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Oct 29, 2010 at 1:22 PM, Michael Pavling <pavling@gmail.com> wrote:
On 29 October 2010 19:03, David Kahn <dk@structuralartistry.com> wrote:I think you misunderstand that article.
> Why is Rails looking for a template while I have told it to render a
> specific file? This worked under Rails 2. I read
> http://www.engineyard.com/blog/2010/render-options-in-rails-3/ which from I
> gather makes any format.xxx look for a template xxx which is *not* what I
> need to do as the file is created dynamically:
Looks to me that instead of passing css filenames into the
"ActionController.add_renderer" block, you could just as easily pass
your actual dynamically generated PDF, and then have the "send_data"
call send your file.
Thanks Michael and Rob - you got me through this. The following works:
send_file "#{TEMP_DIRECTORY}/#{comparison.id}_#{params[:view]}.pdf", :stream => false, :type => 'application/pdf', :disposition => 'inline'
But I agree, it's certainly easier the just "render :file => foo_bar"
Right. I know there must be a good reason for a lot of these changes and at some point it will all come together the ponies and rainbows will appear. I am waiting semi-patiently for this moment :)
- which I do in some of my controller actions, and I've not moved to
Rails3 yet, so I'll be interested in your result.
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hello. I'm working very hard to build projects > photo_albums > Photos
But am Stuck on being able to implement it.
Desired User Flow...
#1 - User clicks their project
#2 - User sees a list of photo albums
#3 - Users clicks a Photo Album
#4 - User see a list of photos in the album
#5 - User views the clicked photo BUT has will_paginate showing in
the nav for all the albums photos and will_paginate is defaulted to
the page number of the photo the user clicked
Controllers Based on the Flow Above:
#2 - PhotoAlbum Index
#4 - PhotoAlbum Show
#5 - Photo Show
Routes:
resources :spaces do
resources :photo_albums
resources :photos
end
Does this sound right? Bec I haven't been able to get this working,
and the code is getting ugly :)
Thanks
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.