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
<script> | |
var AjaxURL = "<?php echo admin_url( 'admin-ajax.php' )?>"; | |
</script> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<article id="post-<?php the_ID(); $currentPostId = $post->ID; ?>" <?php post_class( 'event-type' ); ?>> | |
<header> |
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 | |
/* | |
Admin | |
*/ | |
require_once( ABSPATH . 'wp-admin/includes/taxonomy.php' ); | |
class Morgans_Post_Type_Admin { |
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
url = URI.parse('http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=fries') | |
req = Net::HTTP::Get.new('http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=fries') | |
res = Net::HTTP.start('ajax.googleapis.com', 80) {|http| http.request(req)}%> |
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
SHOW.JS.ERB | |
$("#video_div").html("<%= escape_javascript(render(:partial => "client_stories/client_story")) %>"); | |
!-------------! | |
INDEX.HTML.ERB | |
<div id='main_profile_column'> | |
<div id="video_div"> | |
<% @client_stories.each do |client_story| %> |
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
Mailman::Application.run do | |
default do | |
u=User.find_by_email(message.from.first) | |
fn = File.open(message.attachments.first.filename ) | |
Deal.create! title: message.subject, description: message.body.decoded, user_id: u.id , | |
dimg1: fn, | |
category: 'furniture' , price: 12 | |
end | |
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
Leo-Royzengurts-MacBook-Pro:mmagap leoroyzengurt$ heroku logs --app mmagaptest | |
2013-04-08T17:07:42+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:601:in `call' | |
2013-04-08T17:07:42+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:32:in `call' | |
2013-04-08T17:07:42+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call' | |
2013-04-08T17:07:42+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' | |
2013-04-08T17:07:42+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:184:in `call!' | |
2013-04-08T17:07:42+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each' | |
2013-04-08T17:07:42+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:164:in `call' | |
2013-04-08T17:07:42+00:00 app[web.1]: vendo |
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
Gemfile | |
source 'https://rubygems.org' | |
gem 'rails', '3.2.12' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
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
Mmagap::Application.routes.draw do | |
ActiveAdmin.routes(self) | |
devise_for :admin_users, ActiveAdmin::Devise.config | |
post "zencoder-callback" => "zencoder_callback#create", :as => "zencoder_callback" | |
get 'tags/:tag', to: 'videos#index', as: :tag | |
devise_for :users, :controllers => { :omniauth_callbacks => "omniauth_callbacks" } | |
devise_for :users | |
match '/dashboard' => 'users#dashboard', :as => 'dashboard' | |
match 'users/:id' => 'users#show' | |
devise_scope :user do |
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 CommentsController < ApplicationController | |
def index | |
@commentable = Video.find(params[:video_id]) | |
@comments = @commentable.comments | |
end | |
def new | |
@commentable = Video.find(params[:video_id]) | |
@comment = @commentable.comments.new | |
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
<div class="btn-group span3"> | |
<div class="btn btn-inverse btn-sort">Price</div> | |
<div class="btn dropdown-toggle btn-inverse" data-toggle="dropdown"> | |
<span class="caret"></span> | |
</div> | |
<ul class="dropdown-menu"> | |
<% Listing::PRICECATEGORIES.each do |category| %> | |
<li> | |
<label class="checkbox"> | |
<%= check_box_tag 'q[pricecategory_eq_any][]', category %> |