Hello, I''m using file_column to save my users images. It''s all OK, but I want to prevent one user from accessing other user''s image. Is it possible, as the image is saved in the file system ?? Thanks Parra -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060818/7a00210e/attachment.html
Marcello Parra wrote:> I''m using file_column to save my users images. > It''s all OK, but I want to prevent one user from accessing other user''s > image. > Is it possible, as the image is saved in the file system ??Once you figure out the change to make file_column store in a non-public directory (see ''Uploading files to a directory outside of the RAILS_ROOT'' at http://wiki.rubyonrails.org/rails/pages/HowToUseFileColumn) then you can use send_file to ''serve'' up images from your actions with the appropriate security. See this thread for more information: http://lists.rubyonrails.org/pipermail/rails/2006-June/046458.html Jeff -- Posted via http://www.ruby-forum.com/.
Has anyone gotten the DhtmlCalendar plugin/engine working? I installed the plugin and also the engine plugin and followed all the instructions. I can''t get past "undefined method ''popup_calendar''". Also it is unclear to me if the inclusion of the line below means I must install the dry_scaffold engine as well. Engines.start :dry_scaffold
This is what I need... Thanks Jeff On 8/18/06, J Amiel <jeff.amiel@gmail.com> wrote:> > Marcello Parra wrote: > > I''m using file_column to save my users images. > > It''s all OK, but I want to prevent one user from accessing other user''s > > image. > > Is it possible, as the image is saved in the file system ?? > > Once you figure out the change to make file_column store in a > non-public directory (see ''Uploading files to a directory outside of the > RAILS_ROOT'' at > http://wiki.rubyonrails.org/rails/pages/HowToUseFileColumn) > > then you can use send_file to ''serve'' up images from your actions with > the appropriate security. > > See this thread for more information: > > http://lists.rubyonrails.org/pipermail/rails/2006-June/046458.html > > Jeff > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060818/fe8f0002/attachment.html
> I installed the plugin and also the engine plugin and followed all the > instructions. I can''t get past "undefined method ''popup_calendar''".I''ve been trough the same thing right now, on: http://wiki.rubyonrails.com/rails/pages/CalendarHelper I''ve correct two errors (typos) about the helper''s name you need to include Enrico -- "The only thing necessary for the triumph of evil is for good men to do nothing" Edmund Burke
Anyway the value you choose from the popup calendar (using calendar_field helper) is not reported to the text box. Has anybody succesfully used that plugin''s calendar_field helper? Thanks -- "The only thing necessary for the triumph of evil is for good men to do nothing" Edmund Burke
Well there was a error in the code, if you need the calendar_field you will need to change: Calendar.rb, Line 149: input_field_id = "#{object}_[#{method}]" to: input_field_id = "#{object}[#{method}]" thanks to Ed Ross. I''ve updated: http://wiki.rubyonrails.org/rails/pages/DhtmlCalendar Enrico -- "The only thing necessary for the triumph of evil is for good men to do nothing" Edmund Burke