similar to: file_field vs. file_field_tag

Displaying 20 results from an estimated 2000 matches similar to: "file_field vs. file_field_tag"

2007 Jul 08
1
file_field_tag and rjs
Hello Is it possible to add and remove file_field_tags on the fly on a form using only rails code and rjs? If so can someone provide a solution. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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
2006 Jan 08
1
uploading an image to a Rails app
Hi, I want to upload a product image to my rails app. I only want to store the file name in the database and the actual image file in public/image/. This seems complicated with file_field. Any pointers or links with explainations? Thanks, Peter
2007 Dec 03
5
spec for model_id should eql
Hello, I''m confused why the spec described below is failing. Other simple comparison specs are passing fine for the same model. The code is working accordingly when I test it through the console, I''m just having difficulty getting this spec to work. Any pointers would be appreciated. Failure message: ''Address fetch and geocode should extract department and write to
2007 Dec 04
12
params not available for controller specs?
Hi, all, I''m trying to write a spec for a controller method that starts out: def download @orders = Order.find( params[:ids] ) ... and started writing a spec that set params[:ids] to a mock. I was surprised to discover that controller specs (at least in RSpec 1.0.8) don''t offer the use of the params object (per
2007 Sep 13
2
Failing to raise an exception in a stub
I''ve come across rather strange behaviour when trying to raise an exception in a stubbed method. I''m speccing the behaviour of a Rails create action, where I''m using save! to catch failed saves. In the case of working save, I''m using the following stub: @client.stub!(:save!).and_return(true) which works fine. However, in the negative case,
2005 Mar 21
3
routes.rb question.
I have a simple program that read all HTML files from a directory and returns parts of the content and the file names which are HREFs to those file. I build the HREF string dynamicaly as PATH_TO_DOC_ROOT + "file_name". My PATH_TO_DOC_ROOT = http://127.0.0.1:3000/docman/public/docs. So, the final link that I am interested in might look like this:
2006 Jan 09
3
rails ignoring the migration file
I have a mysql database that I am trying to use migrations on. The problem that I am having is that when I create a blob field in my migration file like so: t.column "data", :binary, :limit => 15.megabytes, :null => false rails changes it to this in the schema: t.column "data", :binary, :default => "", :null => false not only is this not what I wanted
2005 Apr 20
7
find_all_by and :order
I think I must be missing something obvious... I have... class OrderController < ApplicationController model :order scaffold :order def list @orders = Order.find_all_by_status(@params[:status], :order => "date" ) end end class Order < ActiveRecord::Base belongs_to :customer end and i''m getting... /Unknown column ''orderdate'' in
2005 Dec 21
8
text_area
Hi I''d like to know how to add default text text area using the function text_area. I ''ve tried using value = "....." to do this but with no luck. Could some one please answer my simple question? Thanks. Dan. -- Posted via http://www.ruby-forum.com/.
2007 Nov 13
2
Spec slowdown
Is there something currently going on on the rspec trunk that causes a massive slowdown when running rake spec and autotest (without spec_server)? I updated to the latest trunk yesterday and the time needed to run the specs of my app jumped from ~20 seconds to more than a minute. The weird thing is that if I run the rake spec tasks separately (controllers, models, views, helpers), they
2005 Mar 10
6
Expiring Cache Fragments and fcgi
First let me say that Rails caching is very very cool. The traffic (and responsiveness) I''ve saved by added 10 lines of ruby code would be enourmous, if I actually had traffic... ;) Sweepers as observers are great, btw. Since every page of my side is dynamic, once I did some DB optimization I''m caching the content of the index page which was taking the bulk of the time to load
2008 May 03
6
Everyone Using Rspec Autotest?
I haven''t been spec''ing lately, but been hopping back on and adding autotest. However I get an error: http://pastie.caboo.se/177538/wrap I also noticed a post by Scott and there was mention of rspec_autotest. Is this is what everyone is using? http://svn.caldersphere.net/svn/main/plugins/rspec_autotest/
2005 Apr 25
1
Problems when using sweepers with postbacks
I''m using a cache sweeper class [1] to take care of some pretty complex sweeping. However, there is a problem with the current implementation. Namely, the sweeper gets called only when an action named in cache_sweeper is called using GET. As many methods where sweeper would be useful are using postback to send the form to the same action, this causes the cache to get swept when
2007 Feb 08
7
Informal benchmarks - apache, mongrel, etc
I see that Brian McCallister did some benchmarks recently, showing Apache, Mongrel, Jetty and TwisteWeb: http://kasparov.skife.org/blog/src/ruby/silly-micro-benchmarks.html Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received
2005 Mar 10
8
Login controller additions
I have added roles and roles_users table and updated the model so that my users can have multiple roles. ("Admin" role does always have id = 1). I have added these methods to my application controller. <code> helper_method :is_admin? helper_method :is_user? def is_admin? if @session[''user''] @session[''user''].roles.find(1)
2006 Jan 03
7
link_to an external url ?
Simple question. Is it possible to generate a link like <a href="http://www.google.com" target="_blank" >google</a> with the link_to function ? Thanks
2005 Mar 10
4
error messages, loops and saves, actionmailer and finaly authentication
Thanks to everyone who responded to my first set of questions. Not only did I get my questions answered but I improved my code and learned a couple new things. I think I prefer the mailing list over IRC... easier to follow :-) I have some more questions if you don''t mind. Some are Rails related and some are Ruby related. 1) This is concerning displaying error messages. I am assuming
2006 Nov 28
34
Uploading Large (100mb+) files
I have an Apache 2.2.3 (mod_proxy_balancer) frontend server that does not have mongrel installed. It does proxy requests to several other mongrel-only servers (each running 2 mongrel processes). Each mongrel node has the same rails code-base and it''s working perfectly. However, my question is when I add an upload file form... where is it going to physically put that file? I mean since
2006 Mar 08
19
Creating multiple rows with one form
Hello. I''ve been trying this out for the past two days and I can''t seem to get it. I''m going to have a page where you can upload x amount of images at once. Lets say 10 images need to be uploaded, all with a caption. I''d like to have a browse button to choose the file, then the caption. Now, if I put 10 of them in one form, fill them all out and submit, I get
2005 Oct 11
5
show message while loading - ajax
Hello, Could anybody please tell me how I would show a message or an image while the ajax request gets processed? thank you in advance for your help. this is what I came up with but it doesn''t really work: function getHTML() { var url = "./scripts/rfiles.php"; var par = ""; var myAjax = new Ajax.Updater("fm-viewdetails", url, {method: