Displaying 3 results from an estimated 3 matches for "simplecach".
Did you mean:
simplecache
2005 Mar 24
3
Caching computation in rails?
Caching computation in rails?
Simple example: factorial modulus a large number
input: integer x
output: factorial( x ) % 12345678901234567
I want it so that if it computes factorial of N once, it will not have
to compute for N again.
code:
class SiteController < ApplicationController
caches_action :factorial, :inv
def examine
@inv = @params[''inv'']
@outv =
2005 Mar 26
2
ActiveRecord help needed
Hello, my name is Magnus and I am a RoR-newbie. I am trying to get the
grip of ActiveRecord but I am having trouble to find good examples.
I have been looking at this:
http://wiki.rubyonrails.com/rails/show/AccessControlListExample
Where you can find this Model code:
require ''active_record''
class Permission < ActiveRecord::Base
has_and_belongs_to_many :roles
end
2005 Mar 08
19
find_by_sql ON STEROID possible?
find_by_sql BREAKS THE OOP BEAUTY and perhaps we can solve that.
NAMING CONVENTIONS can perhaps make find_by_sql much more clever.
lets imagine that relation:
publishers <- books <-> authors_books <-> authors -> universities (can''t find
something else than university for that last association :) )
imagine we want to fetch every book and every associated