similar to: Accessing model attributes in ActiveSupport::Concern module

Displaying 20 results from an estimated 500 matches similar to: "Accessing model attributes in ActiveSupport::Concern module"

2007 Mar 19
1
HOWTO: Multiple file upload with file_column
Lots of requests but not many answers on this topic. Here is how you do it: FORM: <table> <% for i in 1..6 %> <tr> <td class=''Label''><label>Title</label></td> <td><input id="<%= "picture_#{i}_title" %>" name="<%= "picture[#{i}][title]" %>" size="30"
2006 Jan 24
3
problem starting domains
I''m trying to start a number of lvm-backend domUs on a Dell Poweredge 2850 (i''ve got nousb on the grub command line, and no usb in the kernel). Some domUs are created and started successfully. However, quite a few of my domUs don''t start properly. I get the correct Started Domain messages... but then the domain doesn''t "go anywhere", meaning
2006 Apr 12
1
Doing destructive actions with a GET request
I know that you should always use a POST to perform actions that are destructive. I intend to break this rule and use a GET, but before I do, I''d like to know if there is a better way of doing this:- I have an account edit form for the user to make changes to their profile. They have to be logged-in to do this. The problem is I have a file_column field within the form which is storing
2014 Dec 23
3
[PATCH] v2v: adding --vdsm-ovf-output option
This option is needed by vdsm for writing the ovf to a specific directory. The default is current directory. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1176598 Signed-off-by: Shahar Havivi <shaharh@redhat.com> --- v2v/cmdline.ml | 5 +++++ v2v/output_vdsm.ml | 16 +++++++--------- v2v/output_vdsm.mli | 1 + v2v/test-v2v-o-vdsm-options.sh |
2006 Mar 09
6
rmagick and captcha
Has anyone implemented a captcha with ruby on rails and rmagick? I tried this example: http://wiki.rubyonrails.com/rails/pages/HowtoSecureFormsWithNoisyImages but I got an error: undefined method `size'' for #<NoisyImage:0x34d8070> Thank you -------------------------------------------------- Rodrigo Dominguez ? Iplan Networks ???????????????Datos Personales
2014 Dec 23
2
[PATCH] v2v: adding --vdsm-ovf-output option
This option is needed by vdsm for writing the ovf to a specific directory. The default is current directory. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1176598 Signed-off-by: Shahar Havivi <shaharh@redhat.com> --- v2v/cmdline.ml | 5 +++++ v2v/output_vdsm.ml | 16 +++++++--------- v2v/output_vdsm.mli | 1 + v2v/test-v2v-o-vdsm-options.sh |
2006 Aug 05
4
file_column just will not work...
Hello, I have been trying for some time to get a file to upload using the file_column plugin. My code is here: http://pastie.caboo.se/7304 But my code is not the issue. I cannot even pass the unit test that come with the file_column plugin. If I run ruby file_column_test.rb i get: 1) Error: test_store_dir_callback(FileColumnTest): TypeError: can''t convert Fixnum into String
2003 Apr 24
1
R 1.7.0 (Windows) Crashes After using "Install Package from Cran option" within
R-Community, (System Details at end) I recently downloaded R 1.7.0 win95 binaries from http://cran.us.r-project.org . After installing the program with no hitch I used the the 'Install Packages from Cran' optinon in the drop down menu from Rgui. (This may be bad form, if so let me know): I selected all paackages to install and everything was fine until the 'dse' package was
2009 Apr 20
1
RJS sporadic error message
I have this form that allows a user to enter a username and save it, assocciating your profile with theirs via an id. A list gets updated and a partial is displayed. The problem is that when I hit the submit button to this form to make this all happened I (sometimes, but more often then not) get an RJS error that reads: TypeError: Cannot set property ''innerHTML'' of bull. I hot
2006 Jan 05
4
testing file uploads
Hi all, I was wondering about the class used when rails receives file uploads. Sometimes it appears to be a File, and other times it is a StringIO. Also it has methods such as original_filename that don''t appear to belong to either of these classes. I ask because I''m trying to work out how to test my fil upload related models and controllers. Is there some standardised way of
2006 Aug 15
8
AGAIN: file object treated as string
I am trying to implement the uploading of a file to a remote server I get error while trying to write the file on the server. The error I get is the following: undefined method `rewind'' for #<String:0x2aaaad062eb8> It seems to be treating my file as a string instead of a File object. --------- Code is below ------------------ VIEW: <%=
2008 Jun 15
11
Ouch! Can't figure out this file upload issue...
Okay, so this is driving me crazy. I''m trying to do a file upload using code from a book. What happens: I get wrong number of arguments (1 for 0) in the upload controller save action. No idea why. Schema: The schema for the picture model object is just a textfield named comments and a binary field called data. Upload controller: def get @picture =Picture.new end def save
2014 Dec 23
0
[PATCH] v2v: adding --vdsm-ovf-output option
This option is needed by vdsm for writing the ovf to a specific directory. The default is current directory. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1176598 Signed-off-by: Shahar Havivi <shaharh@redhat.com> --- v2v/cmdline.ml | 5 +++++ v2v/output_vdsm.ml | 16 +++++++--------- v2v/output_vdsm.mli | 1 + v2v/test-v2v-o-vdsm-options.sh |
2008 Jul 02
3
attachment in mail
How to do the attachment in mail like the yahoo and gmail does? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to
2006 Aug 01
3
Upload file to file system and sql insert date errors
I''m trying to use one form to upload a file to the file system and insert a title and description field into the database. I have no problem uploading files to the file system using the code from http://wiki.rubyonrails.com/rails/pages/HowtoUploadFiles There are more fields on the form than need to be inserted into the database, name and file. I need to pull out these extra fields
2006 May 04
3
File Upload problem when file is small, under 19k(read method returns nothing)
Hi I hope someone can shed some light on this have searched a lot but found nothing definite. This happens on Ubuntu and Fedora 2. I am having a problem with uploading small files (images gif or jpeg under 19k). According to ruby documentation these are stored temporarily as StringIO objects rather than temporary files (as is done with the larger file uploads). The problem is that when it
2007 Jun 07
1
problem with multiple file attachment
hi, actually i have done single file attachment in ruby on rails, now i want to do multiple attachment, but the problem is when i am trying to display the second file name from the params for the testing purpose, i got the error, please can anyone correct the error. in view: <tr> <td bgcolor="#F6F6F6"><%= file_field("picture", "file")
2007 Mar 11
4
Faking it... import local files into attachment_fu
Hello, I''m working on an import utility that will match the functionality of uploading an object of a model that uses attachment_fu for thumbnailing, etc. Rather than uploading the file via a form, I want to populate the params[:image][:uploaded_data] with data from a file already on the server''s file system. So far, I''ve been able to copy to an instance of Tempfile
2007 Dec 11
14
Attachment-fu + Story Runner
Hi all, I''m trying to run a Story Runner integration test that uploads a file through Attachment-fu. I''ve tried various ways of specifying the file data, from custom mocks: class MockFile < Struct.new (:original_filename, :read, :content_type); end fdata = MockFile.new "test_upload.txt", "Test Upload", "text/plain" to
2006 May 29
3
File.size() on Uploaded Images Fail
I am checking the file size of an uploaded file and storing it in a filesize column. It will work just fine when the user uploads any files other than images (jpg,png,gif). Word, Excel, Powerpoint, .zip and more all work fine. This is my model asset.rb that handles the file upload. def newfile=(newfile_field) self.filename = base_part_of(newfile_field.original_filename) self.filetype