search for: photocontrol

Displaying 6 results from an estimated 6 matches for "photocontrol".

Did you mean: phonecontrol
2006 Jun 08
1
Error Handling Question
Being somewhat new to both Ruby and Rails, I am unsure about how to initiate some kind of error handling. Currently I have a blog-like application where each post is a photograph. I am working on the "show" method for the PhotoController and need to tell the application what to do when a photo cannot be found with the specified id: class PhotoController < ApplicationController def show if params[:id].nil? #Take the user to the index page of the most recent photo. @photo = Photo.find_most_recent else...
2006 Aug 04
4
Tabs
...o Ruby/Rails I want to create Tabs similar to these... http://demo.raibledesigns.com/struts-menu/tabbedMenu.jsp;jsessionid=aM2yeUTgLeTbY7WLAZ;jsessionid=aBFrrGHWQim4pwSPAZ?People Can someone outline the best method? Specifically, Is creating a tabs.html in \..apps\views\layouts and using class PhotoController < ApplicationController layout "tabs" ....in my controller the best method? How can I refresh the submenus and page text when clicking from tab to tab? Thank you, jim _________________________________________________________________ Don’t just search. Find. Check out the new M...
2013 Jun 28
1
[HELP PLEASE!] attachment_fu and aws-s3
...et'' access_key_id: ''my_access_key'' secret_access_key: ''my_secret_key'' test: bucket_name: access_key_id: secret_access_key: production: bucket_name: access_key_id: secret_access_key: Im getting this error: AWS::S3::PermanentRedirect in PhotoController#create The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. Rails.root: /home/patrick/my_project Application Trace | Framework Trace | Full Trace app/controllers/photo_controller.rb:12:in `create'' C...
2005 May 23
1
has_and_belongs_to_many dual insert error ?
...sh(tag) end end end class Tag < ActiveRecord::Base has_and_belongs_to_many :pictures def to_s() self.tag.capitalize end def ==(other) return self.tag == other.tag end def <=>(other) return self.tag <=> other.tag end end Controller ---------- class PhotoController < ApplicationController def save pict = @params[''picture''] picture = Picture.new picture.original = main_image picture.title = pict[''title''] picture.body = pict[''body''] picture.au...
2008 Oct 14
0
Attachment_fu, db_file and Windows
I''m having trouble serving images which I have saved as db_files with attachment_fu. I use this code to serve the images: Controller -- class PhotoController < ApplicationController def image @photo=Photo.find(params[:id]) send_data(DbFile.find(@photo.db_file_id).data, :type => @photo.content_type, :filename => @photo.filename, :disposition => '...
2011 Aug 04
1
Creating form for associated has_many model
This example shows how to create a form for an associated model ''Comment'', where ''Comment'' belongs_to ''Post'' and ''Post has_many ''Comments''. http://edgeguides.rubyonrails.org/getting_started.html#generating-a-controller How might I modify that to display all the comments in the form, and still have it call the