If you're using the rails framework, it would look similar to this.

Model file:

class Company < ActiveRecord
end

Controller File:

class CompanyController < ApplicationController
  def show
    @company = Company.find(params[:id])
  end
end

View File:

<table>
  <td>Name</td><td><%= @company.name %></td>
  <td>Address</td><td><%= @company.address %></td>
</table>

and you would call it like so:

http://www.mywebsite.com/company/show/1



On 5/29/07, Vivec <[EMAIL PROTECTED]> wrote:
> Mmm..actually it doesn't look too bad.
> I can actually make sense of it :)
>
> Is this the whole Ruby thing that can be used for web programming?
> How would it look to say read a record from a database and output it
> to a webpage?
>
> On 5/29/07, Loathe <[EMAIL PROTECTED]> wrote:
> > Ruby is pretty damned ugly.  Looks like VB.
> >
> > -----Original Message-----
> > From: Zaphod Beeblebrox [mailto:[EMAIL PROTECTED]
> >
> > just in case you're interested.  I wrote a ruby script to start itunes
> > download the podcasts and close.  I got my inspiration (read code
> > plagiarism) from a couple of different sites doing it in a couple
> > different languages.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:235762
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Reply via email to