[Rails] Delete original input file after delayed_paperclip processing

2013-04-30 Thread Dan Sadaka
Hello all, I am downloading a file from S3 for processing with paperclip and delayed_paperclip. The original downloaded temp file is remaining after processing completes. I'm pretty sure I could add the code to remove this file in the after_post_processing method. However, since the process gets

[Rails] Posting photos to Twitter

2011-11-23 Thread Dan Sadaka
Hello again, I'm trying to post a remote photo (I have a url, not a file) to twitter using the new api call statuses/update_with_media I found one page of doc at https://dev.twitter.com/docs/api/1/post/statuses/update_with_media but could really use an example call from someone that has alread

[Rails] Posting to TwitPic without ruby-twitpic gem

2011-11-22 Thread Dan Sadaka
Hello everyone, I need to post photos/videos to Twitter. I see that TwitPic seems to be the most popular way of doing so. I also see that there is a twitpic gem at github. However, this project is already loaded with gems and I'd rather not have to add three new ones (ruby-twitpic requires Nest

[Rails] Re: Rails 3 routes with same name, different param name based on constraint

2011-10-06 Thread Dan Sadaka
Kleber Shimabuku wrote in post #1025300: > Hi, > > What about to create a default route and just let the manage with the > controller? > > Is it too wrong? I want the parameter name to correctly identify the source of the image so the controller knows where to get it. thx, D -- Posted via http

[Rails] Rails 3 routes with same name, different param name based on constraint

2011-10-05 Thread Dan Sadaka
Hello there fellow RoR enthusiasts, I have been wrestling with rails 3 routes for hours trying to accomplish the following: I want to use the *same url helper* (photo_url) in my views but have a different route match made depending on the format of the parameter I pass. Seems simple enough, righ

[Rails] Client side routine for user definable color scheme

2011-03-10 Thread Dan Sadaka
Hello everyone, I am working on a site that will serve multiple user accounts. Account setup will be done from an "admin" screen. My client wants the setup to include the upload of a logo image as well as selection of a color scheme. The elements on the page will be fixed, but the admin will be

[Rails] link_to a method that outputs to a popup

2011-02-13 Thread Dan Sadaka
Greetings, I am trying to implement a popup window that will contain the output of a method called by a link_to tag. I am using Rails 3 with jQuery and have read that :popup => true no longer works. I have also read a post that said... # --- Start of Post Another option is to use the Rails 3 un

[Rails] Spree drag and drop: not recognizing JS

2010-12-23 Thread Dan Sadaka
Greetings, I asked this over at the Spree google group but got no response. I'm hoping someone here might have experience with this. I am implementing a drag and drop cart with Rails 3 and jQuery. This cart works outside of Spree. The URL I call from the drop action is hardcoded as /products/a

[Rails] using rails_upgrade on windows

2010-10-30 Thread Dan Sadaka
Well, I've been at this for the past two days. I'm trying to upgrade a Rails 2.3.2 app (ruby 1.8.7) to rails 3, ruby 1.9.2 I ran across this rails_upgrade plugin and got excited--at first. However, the installation calls for a ruby script/plugin command, which does not exist anymore. I found a

[Rails] Re: Local not passing to partial when validation error

2009-10-24 Thread Dan Sadaka
Sijo k g wrote: > Hi Dan Sadaka > >Is it solved?If not plese paste your controller code > > > Sijo Sijo, I just used a session variable instead. Thanks anyway, Dan -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~

[Rails] Local not passing to partial when validation error

2009-10-20 Thread Dan Sadaka
Hello everyone, I am passing a variable (showco) to a partial using: <%= render(:partial => "form", :object => f, :locals=>{:mode => "edit", :showco => @showco } ) %> It works fine if there are no validation errors. However, when an error occurs and the form is redisplayed, the variable is no

[Rails] Re: List all field names on a PDF using iText from Rails

2009-05-26 Thread Dan Sadaka
Benjamin, Thanks for the tip. Here is the complete code. The big hangup was the .to_string. I kept trying to use .to_s thinking Rjb would translate for me. NOT! Note that the output can be cut and pasted into a db migration file. *-

[Rails] Re: Looping through java hashmap from ruby through rjb

2009-05-25 Thread Dan Sadaka
Frederick Cheung wrote: > On May 25, 9:28�pm, Dan Sadaka > wrote: >> > Well p (or puts etc) end up calling to_s on objects, and you're > obviously getting Object's default to_s. Does rjb have some method to > convert java strings into ruby strings ? > > Fr

[Rails] Looping through java hashmap from ruby through rjb

2009-05-25 Thread Dan Sadaka
Greetings. I am trying to list all keys in a java.util.HashMap field. The Java code to do this looks like: # Collection c = hMap.values(); # # //obtain an Iterator for Collection # Iterator itr = c.iterator(); # # //iterate through HashMap values iterator # while(itr.hasNext()) System.out.pr

[Rails] List all field names on a PDF using iText from Rails

2009-05-24 Thread Dan Sadaka
Hello everyone, Has anyone used iText to list all fields on a PDF AcroForm? There are plenty of java examples to do it, but I do not know how to translate that into ruby. I'm using Rjb. The Java example I've found is: AcroFields form = reader.getAcroFields(); HashMap fields = form.getFields();

[Rails] Re: map.connect with pattern match

2009-05-15 Thread Dan Sadaka
> And a Flash nav banner? What is this, 1999? :) > > On a more technical note, I've also run into the problem with legacy > links like this. Another option would be to use mod_rewrite (or > equivalent if you're not on Apache) to rewrite the links into the > correc

[Rails] map.connect with pattern match

2009-05-13 Thread Dan Sadaka
I have a site that includes a Flash navigator banner. Rather than have the designer go in and change the links ($$), I would like to redirect his links to mine. His links are in the form "pagename.html". I need each of these links to instead be directed to actions within my home controller. I h

[Rails] Using options on scaffold command line

2009-05-11 Thread Dan Sadaka
Is this posssible? i.e. will this work? ruby script/generate scaffold applicant first:string limit=>30 or other syntax? THANK YOU IN ADVANCE, Dan -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscrib