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
| <?php | |
| if ( has_post_thumbnail( $post_id ) ) { | |
| // check if to show lightbox desc and title | |
| if ( get_option_max( 'pretty_title_show' ) == 'true' ){ | |
| $title = ' title="' . get_the_excerpt() . '"'; | |
| } | |
| $cat_list = array(); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>La llama que llama</title> | |
| </head> | |
| <body> | |
| <h1>La llama que habla</h1> | |
| <p> | |
| <img title="OLA K ASE" src="http://www.oyemexico.com/wp-content/uploads/2012/12/TUku4-380x285.jpg" alt="Una Llama que habla" /> | |
| </p> |
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
| # >-----------------------------[ Run 'Bundle Install' ]-------------------------------< | |
| say_wizard "Installing gems. This will take a while." | |
| if prefs.has_key? :bundle_path | |
| run "bundle install --without production --path #{prefs[:bundle_path]} --standalone" | |
| else | |
| run 'bundle install --without production --standalone' | |
| end | |
| # >-----------------------------[ Run 'After Bundler' Callbacks ]-------------------------------< |
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
| module States | |
| extend ActiveSupport::Concern | |
| included do | |
| state_machine :status, :initial => :new do | |
| event :confirm do | |
| transition :new => :confirmed #, :if => lambda {|order| order.email.present?} | |
| end |
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
| package ErrorLog; | |
| use vars qw/@ISA @EXPORT $AUTOLOAD/; | |
| our $App = shift || "empty"; | |
| use Exporter; | |
| #export methods. can add more, they will be catch'd by AUTOLOAD | |
| @EXPORT = qw /die warn notify/; | |
| @ISA = 'Exporter'; |
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
| class Modifier < Ohm::Model | |
| include Ohm::Typecast | |
| attribute :name, String | |
| attribute :multiplier, Float | |
| end | |
| ############################ |
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
| Array.prototype.to_hash = function(id){ | |
| id = typeof(id) != 'undefined' ? id : "id"; | |
| var self = this; | |
| var out = {}; | |
| $.each(this, function(index, element){ | |
| out[element[id]] = element; | |
| }); | |
| return out; | |
| }; |
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
| state_machine :status, :initial => :new do | |
| event :accept do | |
| transition :new => :accepted | |
| end | |
| event :reject do | |
| transition :new => :rejected | |
| end |
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
| it "should reject a new task" do | |
| task = Factory(:task) | |
| task.reject | |
| task.rejected.should be_true | |
| end |
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
| class ProductsController < ApplicationController | |
| #OJO ACA, esto limita los responses a SOLO json. podes agregar mas | |
| respond_to :json | |
| def index | |
| resultado = Array.new | |
| Product.find_each do |p| | |
| resultado.push(p_para_json(p)) | |
| end |