Derek Neighbors wrote:
> On Aug 10, 2006, at 10:50 AM, Josh Kieschnick wrote:
> 
>> i'm doing a site for someone that has a form set up to collect contact
>> information from the user. i installed the vpim gem and was hoping to
>> give my client a way to download all of the contact's information as a
>> vcard. using the examples, i was able to get it working in ruby,  
>> but i'm
>> not quite sure how to generate and download a vcard on the fly.
>>
>> has anyone done anything like that?
> 
> We are doing this using the SimplyRESTful stuff...
> 
> In the controller for example we have:
> 
>    def show
>      respond_to do |format|
>        format.html
>        format.xml { render :xml => @contact.to_xml }
>        format.vcf do
>          send_data @contact.to_vcard, :filename => "[EMAIL PROTECTED]",
>            :type => 'text/directory'
>        end
>      end
>    end
> 

Using this technique gives me a server response with:

"uninitialized constant Mime::VCF"

I found several mime-type related files in the following directory:
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
mime_responds.rb
mime_type.rb
mime_types.rb

Is there a way to add the .vcf mime-type?
-- 
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to