Displaying 20 results from an estimated 2000 matches similar to: "how to reference a file for download"
2006 Mar 11
2
how do i retrieve a newly created id
in my code i''m calling save on an object. The id gets created as the object
is persisted. How can i retrieve that newly created id? I guess I could
query the table again using the other attributes of the object but is there
another way?
thanks in advance.
larry
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 May 05
5
Attach a PDF File to an Email
Hello ~
I have an email that I need to attach a PDF to. The email is being
sent, and a file is attached but it is not the original file. I am
following the example:
attachment :content_type => "image/jpeg", :body => File.read("an-image.jpg")
changing it to:
attachment :content_type => "application/pdf", :body => File.read("pdf/my.pdf")
2006 May 09
6
To Do list project?
I''m looking for a good web-based to do list app. Essentially, I''d like
to use Basecamp''s todo management system, but that''s not an option
since I can''t install Basecamp on a server I own. The information
being tracked in the list cannot be sent out of my intranet.
I would imagine that there are a couple of open source rails apps that
would meet my
2007 Mar 12
7
Capistrano Hanging on Deployment
Hello ~
I am using the Capistrano recipe outlined in this post to restart my
backgroundrb server:
http://rubyforge.org/pipermail/backgroundrb-devel/2007-February/000718.html
My Version:
~~~~~~~~~~~~
task :before_restart, :roles => :app do
restart_backgroundrb
end
task :start_backgroundrb, :roles => :app do
sudo "nohup
2006 May 17
4
Unable to connect to mySql localhost
Unable to connect to mySql localhost
I installed MySQL 5.0 community version, without opening an account and
leaving the password empty with the Path included in the environment
variable.
In the post-installation testing, I typed C:\mysqlshow, the error
message is
Mysqlshow: Access denied for user ?ODBC?@?localhost? <using password:
NO>
Next, in RadRails 0.6.3, when I double-clicked
2006 May 23
2
TextMate and Tabs
Hello Everyone ~
Recently I have been moving Rails files between Mac, Linux, and Windows. As
many know the Windows Ruby version 1.8.4 doesn''t like tab characters. I
know in TextMate on the mac you can replace your tabs with spaces from the
Text > Convert menu, but is there a way to set it to do tabs with spaces
instead as you work? The preferences do not seem to have such a
2006 May 04
1
Wiki Best Practice
Hello Rails Community ~
Today I added tagging support to one of my Rails apps following this Wiki page:
http://wiki.rubyonrails.org/rails/pages/ActsAsTaggablePluginHowto/versions/32
It outlined adding the necessary database tables with a schema
description in table format. I altered the article to use a
migrations approach with the code from the migration I created to add
the two tables,
2007 Aug 01
4
stability of using scheduled workers
Hi,
Going through the archive, and just keeping a general watch on this list seems to indicate that there are some issues using scheduling with backgroundrb. I need a worker that will perform some actions on an hourly interval. These actions will require access to several of the models in my application. I am currently using backgroundrb to handle processing of files, where I spawn a worker to
2006 May 11
3
LightHTTPD FastCgi Error in Production Mode
I''ve been banging my head against the following for about 8 hours now,
and have exhausted my web research options:
/usr/home/matthew.feadler/rails/avclfc/public/dispatch.fcgi:21:in
`require'': no such file to load --
/usr/home/matthew.feadler/rails/avclfc/public/../config/environment
(LoadError)
from
/usr/home/matthew.feadler/rails/avclfc/public/dispatch.fcgi:21
2006 Jun 27
2
Render partials in folders
Right now I have partials in a view folder corresponding with my controller.
ie: controller: example, view: example/_partial.rhtml
and I call it with render :partial => ''partial''
How do I add the partial to another folder and call it?
ie: controller: example, view: example/new_folder/_partial.rhtml
render :partial => ''new_folder/partial'' # does NOT work
2006 May 17
2
NOOB: Passing parameters between pages
Folks,
I have a rhtml page (page A) that links to another page (page B), and I
want to pass some parameters from page A to page B.
Here is the link code (on page A):
<%= link_to ''Edit'', { :action => ''edit'', :id => permit }, :post => true
%>
If I want to pass a parameter "name" and a value "marcus", and pick it
up on page
2006 May 24
2
Gallery2 integration
Is anybody working already in a gallery2/rails integration?
I need to use it as part of my project, so, before start from scratch
with it I''d like to know if already is something out there.
Thanks.
2006 May 04
6
Login generator ALWAYS says login unseccesfull
Hey I just ran this "ruby script/generate login loging_in" here is my
SQL:
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`user_name` varchar(80) default NULL,
`login` varchar(120) NOT NULL default '''',
`last_update` timestamp NOT NULL default ''0000-00-00 00:00:00'',
`last_attack` timestamp NOT NULL default ''0000-00-00
2006 Nov 04
1
ActionMailer Sending Two text/plain Parts
Hello ~
I have a working ActionMailer Action that takes the template to use as
an argument so I have one action that handles multiple emails. The
email sends just fine, and the correct email templates are used, but
ActionMailer is throwing in its own text/plain section in addition to
the one I specify. Does anyone have any ideas on why this might be
occuring, when I am specificially specifying
2006 May 08
8
RSS Feed / xml.link problem?
I''m having an odd problem. I''m trying to create an RSS feed (working off the
Recipe), but "xml.link" generates error about "Can''t convert Hash to
String". From the error trace, it *looks* like it''s calling the a fileutil
''link'' method (as in, filesystem symbolic link) - even xml.tag! generates
this error.
Er, how do I make
2006 May 19
37
OS for rails development: Windows vs. Mac?
Caveat: this is not a discussion about *hosting* a rails app on windows.
Anyway...Macs are everywhere you look when researching rails (demo vids,
tutorials, and pictures from rails training classes). I''m interested in
what the pros to using a Mac for rails development are (besides
textmate). Is it more of a cultural thing, a what would 37 signals do
thing, is it a unix thing, or
2006 May 27
2
[Repost] OpenID and my db schema
Hi,
I posted this before, but didn''t get an answer, so I''m trying again.
I''ve recently decided to use OpenID to let users log in to my site
instead of old fashioned account creation. They''ll be able to add a
small amount of personal details (about three things) to their
account, and post messages in the site BB. I have an openid_users
table which stores the
2006 May 08
4
<%= text_field %> - how to set the value to session name?
I''m trying to automatically fill a "posted_by" text by with whoever is
logged into the session. How do you set the value attribute using "<%=
text_field ... %>"???
I''ve tried:
<%= text_field ''post'', ''posted_by'', ''value'' =>
User.find(session[:user_id]).name.capitalize) %>
But I get
2006 Apr 27
2
autocomplete question
I''ve just started using the unbelievably easy and cool auto-complete
feature.
Does anyone know if you can make it search only from the start of the string
(or from the beginning of each word)? By default it seems to do a complete
search of the strings - typing MI returns both "Mike Jones" and "Mary
Smith".
I have to believe this will be much slower as the number of
2006 Jan 23
3
[OT] Lighttpd + AWStats
Hello ~
I have posted a tutorial on my blog,
http://www.benr75.com/pages/lighttpd_awstats_tutorial, on how to get
AWStats and Lighttpd to work together. I thought it might be of interest to
Rails folk as I know many run Light.
Enjoy,
--
Ben Reubenstein
http://www.benr75.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: