This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'open-uri' | |
| # url dsl -- the ultimate url dsl! | |
| # | |
| # You just can't beat this: | |
| # | |
| # $ irb -r url_dsl | |
| # >> include URLDSL | |
| # => Object | |
| # >> http://github.com/defunkt.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # God please, | |
| # | |
| # Generic Monitor | |
| # | |
| def generic_monitoring(w, options = {}) | |
| w.interval = 30.seconds # default | |
| w.start_if do |start| | |
| start.condition(:process_running) do |c| | |
| c.interval = 10.seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| = f.error_messages | |
| %div{:style=>"padding-bottom:20px"} | |
| %div | |
| = f.label :name, 'Nombre del producto' | |
| %br | |
| = f.text_field :name, :size => 70 | |
| #clientdesc | |
| %div | |
| = f.label :excerpt, 'Resumen del producto' | |
| %br |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| before_filter :newer_browser_required | |
| def newer_browser_required | |
| # ref http://pastie.org/203799 | |
| # reject MSIE 5.0 and MSIE 6.0 | |
| browser_access_denied if request.user_agent =~ /msie\s+[5,6]\.\d+/i | |
| end | |
| def browser_access_denied |
NewerOlder