Category Archiveruby on rails
How-To & ruby on rails 01 Nov 2008 02:59 pm
Redboxing with Rails: Modal Windows FTW
There’s a great lightbox plugin for Ruby on Rails called Redbox. Unfortunately, it doesn’t work out of the box, but here’s the patch for redbox.js:
Replace:
Element.setLeft(window_id, boxLeft);
With:
$(window_id).style.left = boxLeft + “px”;
Remove or comment out:
Remove:
How-To & WebApps & ruby on rails 21 Aug 2008 08:54 am
The Rails Console Makes Test Object Creation and Debugging Easy
I really like how the Rails console solves the problems of test object creation and debugging.
Usually, a web developer will push code to the webserver and hit shift-reload on the web browser. With the Rails console, you can avoid all that shift-reload madness.
If I wanted to create 10000 blog posts for testing, I could do something like this:
script/console
10000.times
{ |i| Post.create(:title => “post number: ” + i.to_s, :body => “autogen Booyah!”) }
Through the console I can also do debugging pretty easily:
>> p = Post.find 888
And get this as output:
=> #
A lot of problems in Rails are just solved by running script/console and checking the values of certain variables that are pretty hard to get at through a web browser.
There is pretty much no limit to what can be done through the Rails console. Konstantin Gredeskoul, web developer and songwriter, has found a way to load session data through the console.
TechBiz & WebApps & ruby on rails 19 Aug 2008 10:25 am
Mephisto: Blogging Software on Rails
Blogging software should meet four important criteria:
1) Easy import from a pre-existing piece of blogging software we’re not happy with.
2) Spam filtering protection in comments
3) Make it easy to add web analytics javascript tracking without deleting it during each upgrade.
4) Should make it easy to not look like Mephisto blogging software or Wordpress or like generic blogging software.
Mephisto meets all four criteria.
Plus it leverages the advantages of Rails in that out of the box you can deploy to development, test and production environments. Also it integrates with no mess into shopify or any other Rails project that you might be working.
Hats off to Rick Olson(Development) and Justin Palmer(UI/Design) for making Mephisto along with “a bunch of other cool people.”
