similar to: file_field

Displaying 20 results from an estimated 6000 matches similar to: "file_field"

2006 Apr 08
2
ActionView::Helpers::FormHelper instance methods should take an object reference rather than an object_name.
Hi ActionView::Helpers::FormHelper methods (e.g. #text_field, #check_box...) take object_name as an argument. From this argument they infer a name that is supposed to contains the reference to the relevant object. I can''t see why the FormHelper methods were designed that way. Compared to simply passing them a reference, the current way seems too complicated and an invitation to problems
2007 Apr 09
4
How do i switch off error wrapping for a specific field?
Hi, i have some issues with the default rails error wrapping. It wraps errors in a div with class ''fieldsWithError'', which is not good practice in my eyes. Adding a class ''error'' to the field would be much nicer. My solution to the problem: build your own FormBuilder. Funny enough, i found no (nice) possibility to switch error wrapping off while using the
2010 Aug 12
2
session
I tried to understand what a "session" means in Ruby on Rails, and found this site: http://www.tutorialspoint.com/ruby-on-rails/rails-session-cookies.htm But, really, I couldn''t get the idea well yet. Can you just explain what "session" means mire further? Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to
2006 Mar 25
0
in_place_collection_editor
Hi, I''m trying to write a helper for Scriptaculous'' InPlaceCollectionEditor component. I''ve already submitted a patch (http://dev.rubyonrails.org/ticket/4302). This was a drunk patch; it needs a bit of work (Don''t drink & code!). So far I''ve gotten it to work correctly with normal collections, but I want to use it for belongs_to relations as
2006 Jan 22
1
file_field questions
A couple questions about file_field elements. First, with code such as this: <%= file_field ''attachments'', ''filename'' %> Would the filename of the file I select be the value that''s stored within the database under the "filename" column, and then I would just add in code in my "create" controller to upload the actual file?
2006 Jul 28
1
How do I get an original file name from an upload using file_field?
I am uploading a .csv file for importing into a database; however, this file does not need to be saved on the server. How do I get the file name of the original file? I know about the file_column plugin but I don''t need/want to save the uploaded file on the server, I just need to import it and delete it. Right now the file name get returned as some random temp file name... there has to be
2006 Feb 06
2
File_field and Firefox
Hi! Im developing a simple prototype of an application. It fills an oracle db with data about a file in the filesystem, and save the entire file in a blob along with some metadata. To get the file in the db i use a file_field form helper. All goes well with the radrails-integrated browser, but it doesnt work anymore in firefox. The problem is, firefox seems to cut the pathname from the file. Here
2009 Feb 11
0
remote_form_for file_field strangeness
Does anyone see any problem with this form? - form_remote_for(Photo.new, :html => {:multipart => true, :target => :uploader}) do |f| .form_element = f.label :photo = f.file_field :collateral = hidden_field_tag :container_id, @shoot.id = hidden_field_tag :container_type, @shoot.class.name .form_element = f.submit ''Add Photos'' The photo has a
2008 Dec 07
0
boolean button helper
I don''t have a blog, but wanted to share this little bit of code with other semi-beginners like myself who are still learning to take advantage of rails features. Selecting an attribute with a boolean switch is a common pattern in forms. You can do it with a check box, but radio buttons are more expressive in some situations and better convey to the user that they are making a mandatory
2008 Dec 08
1
How to upload file by ajax
Hey'' How to upload file with ajax in ROR? My code not working :( View file : <% form_remote_tag(:url => { :controller => ''Upload'', :action => ''uploadFile''}, :update => "result", :position => :bottom :html => {:multipart => true} ) do %> <p><label
2009 Oct 20
5
Annoying problem with file_field and paperclip
Hi all, I have a really really annoying problem that''s driving me nuts with file_field and paperclip and having to upload images everytime a form is edited even though the user is quite happy with the currently uploaded image or loose the previously uploaded image. This seems to be caused by the rails file_field helper not storing the data that has been read in from the db in the same
2005 Dec 19
0
ActionView::Helpers::FormHelper.text_field
Hi, Is it possible to use the ActionView::Helpers::FormHelper.text_field with an instance variable instead of a model. e.g. In the controller: def meth @value = ''hi there'' end In view: <%= text_field ''value'', nil %> It doesn''t work with what is above (doesn''t like the nil) and produces very strange results replacing nil with
2005 Nov 17
1
original filename doesn't display in file_field
In my item upload view I have: <%= file_field ''item'', ''file'' %> and in my Item model: def file @file #@file.original_filename # <- also tried this end def file=(file) @file=file end And if the upload bails because of errors (and renders the same page), all other fields (text_field, text_area, etc.) retain their inputted values, but the file
2006 Jul 18
0
how to ensure that a file has been selected on a file_field?
Does anyone know how to validate if a file has been selected using a file_field control? I want to ensure a file has been selected before the associated action is selected. Presumably something like validates_presence_of something ? Any pointers most appreciated... John -- Posted via http://www.ruby-forum.com/.
2006 Apr 30
0
ActionMAiler and file_field Question
Hi Gang, I''m trying to figure a way to set an attachment to an email by allowing the user to browse for a file to send with the mail. I thought that I could use file_field to do this - but having no luck. HAs anybody got a working example of how to achieve this? Or is it the wrong way to go? TIA, Eric.
2010 Jul 19
6
Setting a root_url
I know how to setup a roo_url using map.root in "routes.rb". The issue I''m currently having is as follows: I walking through this Rails cast regarding Authlogic: http://railscasts.com/episodes/160-authlogic I decided that I make my map.root the "login" page, that is, the index.html.erb of the user_sessions_controller. So, what I did is typed the following in the
2006 Jan 10
0
Changing scaffold''s text_field to a password_field causes white screen of death in mozilla?
I had posted earlier about ''silent failure of a controller'', what seemed to be an intractable problem where I was getting failure of a particular action in a controller while others worked. What was irritating was that there were no useful messages. Nothing to the browser, nothing in logs, and even the breakpoints wouldn''t hit. Finally by a process of elemination I found
2006 Jan 15
4
file_field vs. file_field_tag
Hi, The documentation doesn''t make it clear why both file_field and file_field_tag are both useful. What is the reason for having two instead of just one of these? Thanks, Peter
2007 Sep 30
2
Outputing to the browser, how?
Hello, I''m writting some helper methods to write forms, so I have this working code: class TableFormBuilder < ActionView::Helpers::FormBuilder ["file_field", "password_field", "text_field"].each do |name| define_method(name) do |label, *args| @template.content_tag(:tr, @template.content_tag(:td, @template.content_tag(:label,
2012 Sep 08
4
dash symbol
In the example below, what is the dash doing between the class attribute and array: (field_helpers - [:label, :check_box, :radio_button, :fields_for, :hidden_field, :file_field]).each do |selector| -- 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