August 2010
8 posts
1 tag
Run irb from file
In case I forgot.
1 tag
safari json formatter - must have! →
4 tags
Rails 3 remote update form
Rails 3 brings some nice unobstrusive javascript. This very short tutorial will show how to make simple yet powerful ajax update form.
First, grab jquery-ujs file (or gem). Next, create some model and REST controller.
Controller needs a small change:
Thats pretty self explaining: when object is valid send notice message, else send errors as json array.
View:
Only the :remote => true part...
Quickly get some random image placeholders
Big thanks to placehold.it!
1 tag
stJhimy - Improving TextMate "Go To File" function →
2 tags
Uploadify, Paperclip, Rails 3 and Sessions by... →
1 tag
Textmate split view
3 tags
Better (scoped) rails engines routing
Rails engines are really great, but they are missing one thing - putting in router scope. Fortunately, this can be easily fixed.
Instead of engine`s config/routes.rb file put all router stuff in lib/engine.rb like that:
And now it is possible to add scope:
Done!
Example gist