NetManiac

Witold Rugowski on web20 wave with Ruby on Rails

Testing Rails application with ActsAsAuthenticated plugin

Posted on September 25, 2006 - Filed Under Ruby | Leave a Comment

Acts As Authenticated plugin is first choice when You want add authentication to Your Rails application. Next step is to add some test to Your code (everybody writes tests, right?). But looks like Google have no clue for newbies how to setup. So here comes simple recipe: when You add ActAsAuthenticated plugin to Your app, [...]

Popularity: 3% [?]

Read More..>>

Saving objects and :id revisited

Posted on September 25, 2006 - Filed Under Ruby | Leave a Comment

After I have discovered proper order object saving I read a little Rails documentation and… When Your app model have has_many and belongs_to (in my case Route has_many :points and Point belongs_to :rotue) Rails extends Your objects and in particular for Point adds property route which can be assigned with Route object. Like that: pt.route [...]

Popularity: 2% [?]

Read More..>>

First save, then use :id

Posted on September 22, 2006 - Filed Under Ruby | Leave a Comment

Well. Sometimes not all obvious things are so obvious ;-)) When creating some ActiveRecord objects, remember first to save it before using its :id. Lets look at this code: rt = Route.new pt = Point.new pt[:route_id] = rt[:id] rt[:name] = “New one” rt.save pt.save Will this work? It will depend on this what You expect [...]

Popularity: 3% [?]

Read More..>>

How to start debug Ruby programs?

Posted on September 20, 2006 - Filed Under Ruby | Leave a Comment

Last days I was busy in my free time with some strange error in Ruby on Rails. Or probably with my own application, rather Rails itself. Problem which I’m trying to solve is described in more details in this post to Ruby Forum. In short – my app encounter some strange delay when I’m sending [...]

Popularity: 3% [?]

Read More..>>

Debugging HTTP

Posted on September 15, 2006 - Filed Under Links, Tech | Leave a Comment

For all Windows folks tool written by Microsoft, which can be useful for debugging any HTTP related stuff. Fiddler (http://www.fiddlertool.com/fiddler/) is a local proxy, with nice interface for inspecting all traffic. So, when You debug some HTTP related issues, install on client this tool (requires .NET v 1.1 Framework) and redirect traffic to this proxy. [...]

Popularity: 2% [?]

Read More..>> « go backkeep looking »