similar to: How can I check if a file has been created?

Displaying 20 results from an estimated 100000 matches similar to: "How can I check if a file has been created?"

2009 Jan 11
2
How can I delete a file?
I want to delete a file that is in public/system/photos/original/1/photo.jpg. How can I delete it? -- 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
2009 Feb 22
6
CHECK if param exists? please help
hi folks. i want to check if a param exists if not to set it to a default value for my date range filter. in my controller i have: @from_date = Date.strptime(params[:startdate],"%d/%m/%Y") @to_date = Date.strptime(params[:enddate],"%d/%m/%Y") @articles = @results.find(:all, :conditions => [ "created_at >= ? and created_at
2008 Mar 07
6
creating a model registry
Hi all, This is a problem I''ve approached so many times and always worked around, that now I want to solve it once and for all. Say I have something like this: --- class X < ActiveRecord::Base acts_as_wacky end module Wackinator class ControlAllWackos @@wackos = [] def self.kill_wackos @@wackos.each(&:kill) end end def acts_as_wacky
2008 Dec 22
7
Help creating and using database
I have this problem. I have a Job table in my db, and each job has many steps (table Step). Is not possible to know how many steps a job has until it is created. So when I create a new job I have a problem: I can not have a step_id in my Job table, because it can be one step or more. What can I do? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~
2009 Feb 15
1
How can I save the destination url with all the parameters?
I want too save the destination url with all the parameters (like some ids) in a variable session, so first I login the app and then redirect to this destination. How can I save this variable? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2009 Apr 19
15
Not quite a rails question but can anyone advise?
Hey guys! I''m having a little trouble trying to integrate RMagick with my rails app. In the online terminal (on my host''s server) if I write: export "LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" before opening the rails console then I can require "RMagick" no problem. Without adding usr/local/lib to the LD_LIBRARY_PATH I get the error message described
2007 Jul 19
8
Where do I put code for my own types?
Sorry for all the questions today... Beyond the obvious things--models, controllers, helpers, and other framework-related types--where should I put the code for my own types? For example, I was thinking of writing my own AJAX-friendly paginator, but I don''t know where to put the code for that sort of thing. I would prefer to keep things object-oriented, so I would rather do a lot of
2007 Sep 04
2
How can i add a confirmation dialog to a submit_tag?
When i use button_to or link_to, i can easily request a confirmation dialog with (for example) <%= button_to "Delete this story", { :controller => "story", :action => "delete", :id => @story.id }, :confirm => "Delete story: are you sure?" %> I also want to do this for the submit buttons on my forms, which are
2009 Jan 22
4
Is there a plugin that can autofill(ajax) during user input?
I haven''t done rails in a year, but can someone tell me if there is a plugin or how much work is it to add an auto fill function like google''s front page? Would you just use an observer on the form or is there already a built in class that can do this? Thanks! Feng -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received
2006 Oct 09
1
How can I go back to where I was?
How can I make a user go back to where he was after doing something with a post. For example, let''s assume that the user clicked a post in a third page, and after doing something (reply, destroy and so on) with the post it just redirect to the list. But at this time, the user always go back to the first page because of "redirect_to :action => ''list''" Is
2006 Sep 21
10
Can I use 2 DB connections in my app?
Hi there! How can i use 2 database connections in my rails application ( if it''s possible of course ): one for reading from DB and one for writing to DB? Thanks, Dmitry -- 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
2007 Aug 21
7
rails truncating raw_post_data?
Has anyone ever run into any problems with rails truncating raw_post_data. My situation is this: I''m the developer for RubyAMF (wiki.rubyamf.org). Which is a flash remoting application server. With the rails plugin, it allows flash to talk to a controller and return AMF data.. So long story short, the flash player makes a request to a rails controller sending AMF binary format in the
2007 Nov 28
1
how can I connect with postgresql using rails ?
Dear Friends, I am a new of ruby on rails. In my server mqsql is not installed,instead of mysql I am having the postgresql. How can I connect with postgresql using rails ? Please anyone help me to study further details. with deep regards, S.Vellingiri -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this
2008 Aug 27
6
Restful routes
Hi, I''m pretty new to the concept of restful routing and am struggling to find any rails 2 info that helps with what I''m looking for. I have a regular scaffold setup and the routes are setup as default map.resources :pages I would like to be able to use titles in the url rather than relying on the id. Eg localhost:3000/pages/sometitle instead of just localhost:3000/pages/1
2009 Jan 10
2
finding eval unique values in a name column
Hi, How to have an output using eval for a unique values in a "name" calumn? Data; {:name=>"maria", :name=>"lorie", :name=>"maria", :name=>"smith", :name=>"maria"} {:name=>"maria", :name=>"den", :name=>"maria", :name=>"smith", :name=>"ole"} Output
2006 Nov 16
2
Creating and writing to a file
Hey guys, What would be the best way to create and write to a file? Thanks. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe
2008 Jan 07
3
Rails check for a .js template instead of .rjs?
respond_to do |format| format.html format.js { render :template => "login" } end Whenever I send an AJAX request to the action that has that code it says it cant find the template login.js. Why isnt it looking for login.rjs? Also when I take out the render it serves up the rhtml template instead of the rjs template. Any idea why this is? I am using edge rails and the latest
2008 Dec 19
2
Remember that checkbox has been checked!
Gdday everyone today I come up with this question. 1.I''ve a check box on my page. 2.I checked on this box. 3.I need to click on (link_to) to redirect on this page again. 4.I found that my check box''s uncheck. How can I pass checked value in to this box? Thx to all suggestion -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You
2007 Aug 30
3
has/belongs to many sql error
I have a model Asset which has_and_belongs_to_many :tags. Tag has only one field, name. There is a table assets_tags which only has an asset_id and a tag_id. I can add a tag to one asset. If I try to add the same tag to another asset though (asset.tags << tag) I get this error: Mysql::Error: #23000Duplicate entry ''4'' for key 1: INSERT INTO assets_tags (`tag_id`, `id`,
2007 May 25
3
check box value in array
Hi guys, I have a group of check box in rails page. check box Code as below: <% for count in @total_cellno %> <input name="checkbox" type="checkbox" value="<%= count %>" /> <% end %> I want to receive the selected value in my controller model. @selected_box << params["checkbox"] I guess that it provides values