Saturday, July 07, 2007

Learn Ruby & Rails

Install:
http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx

Learn Ruby:
http://tryruby.hobix.com/
http://www.ruby-lang.org/en/documentation/quickstart/
http://poignantguide.net/ruby/
http://ruby.on-page.net/

Watch some VIDEOS!
http://railscasts.com/

Move it on up to Rails:
http://www.sitepoint.com/article/learn-ruby-on-rails
http://6brand.com/beginning-ruby-on-rails

Documentation:
http://www.noobkit.com/
http://railsmanual.org/

2 hashings:

badxmaru said...

hi there
saw your post on say no to milk about lack of documentation for attachment_fu and :db_file,

I've gotten to the point of loading pictures off the database after entry

@image_data = Picture.find(params[:id])
@image = @image_data.db_file.data
send_data (@image.public_filename, :type => @image_data.content_type,
:filename => @image_data.filename,
:disposition => 'inline')

wonder if you had a cleaner way to do it, using the actual "public_filename" call, which seems to barf if it doesn't pull a file from the filesystem.

-badxmaru

Galtzo said...

Actually after talking to some smart people on the rubyonrails IRC freenode I decided that database storage was too much of a performance hit, when I am perfectly capable of storing things on the file system. My problem with using the file system was that the files were stored in public, and I didn't want there to be a public URL that could serve the files through Apache (or whatever front-end) completely avoiding all authentication within my rails app. This was solved by not storing the attachment_fu files in public by using something like this:
:path_prefix => '/video_data',

This blog began on Monday, September 27, 2004.
Hits since 2/20/2007:
free hit counters
free hit counters