I think the cleanest solution is to use two function, one that use Fixnum
and another for the Card.
Obviously, the latter will internally use the first:
def fn(a, b, n)
# do stuff
end
def fc(a, b, c)
fn(a, b, g(c))
end
However, if you still don't like this, you can just check if the last
p
Hello all,
Is there any good resource where to start to understand how the various
internal component of rails are glued together? Maybe a book that dissect
this massive framework?
Debugging it is never so simple, due to a lot of "magic" (aka meta
programming) involved.
Thanks :)
--
You recei
The first solution that comes in my mind:
class PostsController < ApplicationController
before_filter :authenticate_user!, only: [:create, :update, :destroy]
def authenticate_user!
session[:post] = params[:post] unless user_signed_in?
super
end
...
end
... and then you check if se
I want to add a spec for _form template, and then created a generators the
inherit from Rspec::Generators::ScaffoldGenerator. What I have:
# lib/generators/rspec_modded/scaffold/scaffold_generator.rb
require 'generators/rspec/scaffold/scaffold_generator.rb'
module RspecModded
module Generators
4 matches
Mail list logo