search for: imagecontrol

Displaying 8 results from an estimated 8 matches for "imagecontrol".

Did you mean: damagecontrol
2006 Jun 26
5
How can I dynamiclly generate models?
...d end init.rb require ''acts_as_commentable'' ActiveRecord::Base.send(:include, Commentable) image.rb acts_as_commentable This results in Image::Comment, Book::Comment...(I have no idea about how defind top level classes ImageComment, BookComment... :( ) and my controller: def ImageController def view ... @comment=Event::Comment.new #line 45 ... end end everything is ok when I start webrick and direct to this page, but when I refresh my brower, an error ocurr: NameError in ImageController#view uninitialized constant Comment c:/ruby/lib/ruby/gems/1.8/gems/activesupp...
2006 May 31
3
instance variable problem
...r :action => ''new'', does it just render the template or should I have the instance variable as well also? I''ve tried changing it to redirect_to and it doesn''t error, but also doesn''t provide the error messages I want. I''ve got this in my ImageController: def new @categories = Category.find(:all) end def create if request.post? @image = Image.new(params[:image]) @image.categories = Category.find(params[:category_ids]) if params[:category_ids] if @image.save redirect_to :action => ''list'...
2006 Jun 28
2
NoMethodError when setting session variable
...i'' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:597:in `each_cgi'' /vendor/rails/railties/lib/fcgi_handler.rb:53:in `process!'' /vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'' dispatch.fcgi:25 Here is my Controller Code: class ImageController < ActionController::Base def initialize session[''curimg''] = Time.now end def showtime render_text session[''curimg''] end Can anyone see what I am doing wrong?? -- Posted via http://www.ruby-forum.com/.
2005 Jun 06
14
Handling Images And Rails
On my website people will be able to upload images of themselves. I was wondering how people are presently handling uploading, resizing and optimizing images in Rails? Do you use a specific piece of software to do it? What would you guys recommend? Any code from RailsDay? :-) Also, do you guys store the images in the DB or just as files? What do you suggest? What are the pros and
2005 Mar 08
3
Extracting images from a DB
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I would like to extract an image BLOB from my database and display it alongside some other information on my ''edit'' page. I read the information here http://wiki.rubyonrails.com/rails/show/HowtoUploadFiles and that was really helpful. However, it still isn''t clear to me how I would get access to the image in my views if
2006 May 31
6
Restricting access to files uploaded by file_column
Hi Guys, Does anyone know how to restrict access on files that you upload in file column to certain users only? I notice that files being saved by the file_column by default are being saved under the public folder and can be accessed just by typing the URL directly. Let''s say you have a Login system where you restrict access to some pages and allow those users to upload their own
2006 Apr 17
8
file upload
This is probably me having an issue with the mvc way of living.. .I''m used to perl/php scripting... I''ve got a photo blog I''m making... and in past iterations of this website, I''d just name the photos after the id of the entry. For instance: /photos/id.jpg /photos/id_thumb.jpg However, I''m having trouble finding an easy way to do this with rails.
2007 Jan 04
5
uninitialized constant oddities
...ers being run?) the strange thing just is that everything works fine when run from script/console ... except when commenting out the "require ''image/base''" from config/environment.rb! -- how come? code details are as follows: app/controllers/image_controller.rb: class ImageController < ApplicationController: ---- snip ---- def list # Image.count is where all evil originates @images = ::Paginator.new(Image.count, 10) { |offset, per_page| Image.find(:all, :limit => per_page, :offset => offset) }.page(params[:page]) end ---- snip ---- app/model...