search for: images_controller

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

Did you mean: image_controller
2006 Apr 10
3
File Upload Problems
...C:/Apache/Apache2/htdocs/ror/ae/public/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/models/post.rb:3:in `initialize'' #{RAILS_ROOT}/app/models/post.rb:3:in `open'' #{RAILS_ROOT}/app/models/post.rb:3:in `save'' #{RAILS_ROOT}/app/controllers/images_controller.rb:24:in `create'' Initially, I thought it is a permissions issue on the folder not allowing the web user to create a directory, but I can''t find a place in the apache config or .htaccess files to specify the correct permissions. Here''s my environment: Ruby version 1....
2006 Feb 28
1
ArgumentError (string contains null byte) -- file upload problem
...e image using send_data, I get the following error: ArgumentError (string contains null byte): .//vendor/rails/actionpack/lib/action_controller/streaming.rb:55:in `file?'' .//vendor/rails/actionpack/lib/action_controller/streaming.rb:55:in `send_file'' .//app/controllers/images_controller.rb:5:in `show'' Here''s the image controller: class ImagesController < ApplicationController def show image = Image.find params[:id] send_file image.blob, :type => ''image/jpeg'', :disposition => ''inline'' end end Any ideas? J...
2010 Aug 18
0
paper clip plugin validation fails
...in its working quite well , but one problem is its able to upload all kinds of file. see i want only png,gif,jpeg and should show error message if validation fails.here if i applied validations in the model the result is errors like this ArgumentError (too few arguments): app/controllers/images_controller.rb:63:in `format'' app/controllers/images_controller.rb:63:in `create'' vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:19:in `process'' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run''...
2007 Apr 19
2
invalid geometry string in change_geometry
...rows) } # img.change_geometry("#{size}") {|cols, rows, i| i.resize! (cols,rows) } end ... but it all works OK when the size is buried within "#{size}". The debugger doesn''t seem to see any difference: (rdb:1) l [112, 121] in ./script/../config/../app/controllers/ images_controller.rb 112 def make_thumb (the_img) 113 require ''RMagick'' 114 size = "110x" 115 debugger if ENV[''RAILS_ENV''] == ''development'' => 116 img = Magick::Image.from_blob(the_img.img_data).first 117 im...
2010 May 03
7
rendering images dynamically
Hi, I have a rails application where I respond to a request by fetching image urls from various web api calls and need to display them as they come available. I am able to display all the images once I get them all, but that causes an unacceptable delay for my user. One approach I am trying is, from my controller, set an @image variable, and then pass in a block to the model that retrieves the
2006 Apr 20
2
Image Display Question
...ion mark at the end of the string. I have no idea where this coming from. Here are the important parts of my code: In the ''image'' model: DIRECTORY = ''public/uploaded_images'' def to_url return DIRECTORY + "/#{self.id}-thumb.jpg" end In the images_controller: def list @images = Image.find :all, :order=>"id DESC" end In the list.rhtml view: <div id="photos"> <%= render :partial=>''images'', :collection=> @images %> </div> ...and in the partial: <%= image_tag(images.to_...