search for: file_system_path

Displaying 7 results from an estimated 7 matches for "file_system_path".

2007 Mar 04
3
Dynamically setting the image directory used by attachment_fu
...tem_image object. # Make sure the related item is associated to the thumbnail child before_thumbnail_saved do |record, thumbnail| thumbnail.item = record.item end def full_filename(thumbnail = nil) # Just to be sure the ID gets set raise "Missing Item ID" if item_id.nil? file_system_path = (thumbnail ? thumbnail_class : self).attachment_options[:path_prefix].to_s File.join(RAILS_ROOT, file_system_path, item_id.to_s, attachment_path_id, thumbnail_name_for(thumbnail)) end and in your Item class you add a condition since it makes it easier to iterate over the images and for examp...
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested. But, I added some code to that model that I do need to test. Basically, I need to somehow fulfill the "uploaded_data" property so I can actually run my tests(otherwise they fail because of validations). The "uploaded_data" field is what would grab the multipart data from form. Here
2010 Jul 11
0
Attachement_fu error when updating existing photos
...like MyModel # # public/#{table_name} is the default filesystem path # RAILS_ROOT/public/my_models/5/blah.jpg # # Overwrite this method in your model to customize the filename. # The optional thumbnail argument will output the thumbnail''s filename. def full_filename(thumbnail = nil) file_system_path = (thumbnail ? thumbnail_class : self).attachment_options[:path_prefix].to_s File.join(RAILS_ROOT, file_system_path, *partitioned_path(thumbnail_name_for(thumbnail))) end Anybody have an idea what I am doing wrong? -- Posted via http://www.ruby-forum.com/. -- You received this message becaus...
2007 Dec 13
4
Attachment_fu problems on updates
...egion_code has_many :groups, :through => :group_members has_one :photo, :as => "photo_for" validates_associated :photo end Here is the file_system_backend (where the error is occurring): ----------------------------------------------- def full_filename(thumbnail = nil) file_system_path = (thumbnail ? thumbnail_class : self).attachment_options[:path_prefix].to_s #here is the join that is failing #logger.info "rails root:" + RAILS_ROOT => /Users/... #logger.info "file sys path" + file_system_path => public/photos #logger.info thumbnail...
2007 Sep 18
2
Making attachment_fu polymorphic
I am working on a small model mixin called attachment_kung to make attachment_fu polymorphic, so you no longer need a different table and Model class for every associated attachment (Productimage, Ad_doc, etc). All you really need is one model and table to handel all your attachments - in some cases, anyway. I have the code working, but have run into one small hitch that I can''t seem to
2007 Jan 30
1
Error message when building a package
...n/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load] make: *** [roots.so] Error 1 chmod: /../myrlibrary/roots/libs/ppc/*: No such file or directory ERROR: compilation failed for package 'roots' ** Removing '/../myrlibrary/roots' ============================================================================...
2007 Apr 05
1
Problem installing rgdal on Mac OS X
...btool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load] make: *** [rgdal.so] Error 1 chmod: /Library/Frameworks/R.framework/Versions/2.4/Resources/library/rgdal/libs/ppc/*: No such file or directory ERROR: compilation failed for package 'rgdal' ** Removing '/Library/Frameworks/R.framework/Versions/2.4/Resou...