Ruby on Rails

Reminder - rails forms with file uploads

Just a quick reminder for myself: if you're doing a form that is uploading files, remember to add :multipart => true to the form tag, e.g.:
[source:ruby]
< % form_for(:product, :url => products_path(@product), :html => {:multipart => true, :method => :put }) do |f| %>

< %= f.file_field :photo %>

< % end %>
[/source]

Tags: 

Insanely easy tabbed web pages with Prototype

I came across this today when trying to find an easier way to present a six-part form in a Rails project - a tabbed interface system built upon Prototype (an integral part of Rails). Called Control.Tabs it makes tabbed interfaces a synch to do: simply add an unordered list containing links to the blocks containing your to-be-tabbed content, and add a line of JavaScript to start the ball rolling - that's it!

Tags: 

(not going to finish) Production web serving with Cygwin - PHP, Ruby on Rails & ColdFusion

Note: I'm not going to finish this article as ultimately I ran into problems with Cygwin so migrated to running all Windows-native tasks. Still, in its raw state someone might find some use out of it.

Tags: 

Pages

Subscribe to Ruby on Rails