search for: leonb

Displaying 3 results from an estimated 3 matches for "leonb".

Did you mean: leon
2007 Mar 29
1
Extending the to_s method
Hi! I''m developing an localization plugin (just for my own purposes) and I wanted to extend the to_s method for the Time class. What I want to do: when someone does date.to_s(:short) that a localized version of the :short date is displayed. But I don''t know how to accomplish this. I know have this: class Time def to_s(option) print option.to_yaml
2008 Jul 14
4
Execute some steps if a file isn't present
Hi all, I''ve come quite far with my puppet setup, but a few times I got this problem: I want to execute a few things if a file isn''t present on the puppet client. For example: I want puppet to check if the mod_passenger apache module exists. If not: installl passenger from gem. Execute the installer, copy the config file and enable the module with a2enmod. What would be the
2007 Mar 11
0
Good code?
Hi, Could you look at some code I created? I don''t know if it''s good... or if it could be better. Especially the controller. I couldn''t find a way to let the declaration_payers be automatically saved. declarations_controller.rb: def create @declaration = Declaration.new(params[:declaration]) unless @declaration.save @users = User.find(:all)