December 20, 2006 – 9:03 am
FlexOnRails have two (first, second) detailed posts on using WebORB for Rails with Flex. The demo app uses Adobe’s Cairngorm a framework for Flex and it’s Value Objects which can be mapped (through WebORB) to server side objects. Make sure to read the comments on the second post as Derek Wischusen explains the value of [...]
December 18, 2006 – 7:29 am
When uploading a file through Flash every file comes through as with it’s .content_type as ‘application/octet-stream’ so you can’t check it using traditional methods*.
You can limit what kind of file is uploaded in ActionScript:
var allTypes:Array = new Array();
var imageTypes:Object = new Object();
[...]
November 30, 2006 – 8:47 pm
Note this is for emergencies only development will suck up tons of RAM, expose errors/system paths, amongst other undesirable effects.
stop the app
mtr stop [appname]
set development mode
mtr set_option [appname] environment=development
start the app again
mtr start [appname]
debug your app (and fix it, woop!)
stop the app, set productin mode, start the app again; done!
November 14, 2006 – 11:01 am
There’s a good introduction to using WebORB for Rails in Web Developer and Designer’s Journal. It gives a basic overview for the uninitiated while also highlighting some lesser know features such as retrieving Rails session objects and authentication (setCredentials), the latter being a fairly recent addition to WebORB.
October 24, 2006 – 11:43 am
If you’re using Active Record Store for your sessions (keeping sessions in a database) you may ‘lose’ your sessions when jumping to a subdomain or to a https connection (in my case it was the latter).
Here’s how to make sure your sessions don’t go walk about.
Add this line to your ‘config/environments/production.rb’ file
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:session_domain => ‘.mydomain.com’)
obviously replacing [...]
October 21, 2006 – 12:56 pm
I’m sure the cool kids know this already but it gave me a problem so I thought I’d post it.
When using “render :partial => ‘form’”, where ‘form’ is being rendered for a ‘new’ and edit ‘view’, you need to pass a local variable for your model object.
Originally I had
<% form_for :product, @product, :url => { [...]
October 19, 2006 – 6:16 pm
This one was a headache, and by headache I mean I was literally pounding my head on the desk trying to figure it out.
I wanted to use link_to_remote to create a model from another model’s form. The example being a ‘Product’ model that belongs to a ‘Group’, the user would select which group a product [...]
October 12, 2006 – 11:48 pm
For a long time deployment has been the giant stinky Grey elephant in the beautiful Ruby colored room. Rails makes developing an app a joy but for many, including me, deployment has been a bit of a nightmare. If you wanted shared hosting you went with folks who seemingly built their Rails set up by [...]
October 12, 2006 – 5:29 pm
Debugging has come a long way in the last few years, the current crop of tools is making web development faster and easier than ever before.
A great tool I found today is FireBug (late to the party as usual). It let’s you what’s going on under the hood of the browser including JavaScript, CSS, HTML [...]
October 5, 2006 – 1:46 am
Or RoRRIASDK, say that ten times fast!
The kit features six examples – and growing – of Flex/Fash with Ruby on Rails goodness including my Flash Remoting with Rails MP3 player tutorial. Big Ups to Mike Potter of Adobe for setting up the SDK and allowing me to contribute to it.
There’s also an Adobe PHP SDK [...]