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 JirasController < ApplicationController | |
def action | |
send_message :event_name, new_message | |
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
app = angular.module("wallrentjs", ["ngResource"]) | |
@ArtworkCtrl = ($scope, $http) -> | |
$http( | |
method: "GET" | |
url: "http://localhost:3000/api/artists/ac9998fc-1735-44fc-8ae0-814154d9cb2f/artworks" | |
).success(data) -> | |
console.log(data) | |
$scope.artworks = data |
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 ActionView | |
module Helpers | |
module FormOptionsHelper | |
# Return select and option tags for the given object and method, using country_options_for_select to generate the list of option tags. | |
def country_select(object, method, priority_countries = nil, options = {}, html_options = {}) | |
InstanceTag.new(object, method, self, options.delete(:object)).to_country_select_tag(priority_countries, options, html_options) | |
end | |
# Returns a string of option tags for pretty much any country in the world. Supply a country name as +selected+ to | |
# have it marked as the selected option tag. You can also supply an array of countries as +priority_countries+, so | |
# that they will be listed above the rest of the (long) list. |
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
# products > _form.html.erb | |
<%= form_for(@product) do |f| %> | |
<%= f.fields_for @product, :previews do |e| %> | |
<%= e.file_field :image, :name => "product[previews_attributes][0][image]" ,:class => "LargeformTextfield interspaceBottom", :placeholder => "ADD IMAGES" %> | |
<%= e.file_field :image, :name => "product[previews_attributes][1][image]" ,:class => "LargeformTextfield interspaceBottom", :placeholder => "ADD IMAGES" %> | |
<%= e.file_field :image, :name => "product[previews_attributes][2][image]" ,:class => "LargeformTextfield interspaceBottom", :placeholder => "ADD IMAGES" %> | |
<%= e.file_field :image, :name => "product[previews_attributes][3][image]" ,:class => "LargeformTextfield interspaceBottom", :placeholder => "ADD IMAGES" %> | |
<%= e.file_field :image, :name => "product[previews_attributes][4][image]" ,:class => "LargeformTextfield interspaceBottom", :placeholder => "ADD IMAGES" %> | |
<%= e.file_field :image, :name => "product[previews_attributes] |
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
gem 'rails', '3.2.11' | |
group :assets do | |
gem 'angularjs-rails' | |
gem 'sass-rails', '~> 3.2.3' | |
gem 'coffee-rails', '~> 3.2.1' | |
# See https://github.com/sstephenson/execjs#readme for more supported runtimes | |
# gem 'therubyracer', :platforms => :ruby | |
gem 'jquery-fileupload-rails' | |
gem 'uglifier', '>= 1.0.3' |
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 ApplicationController < ActionController::Base | |
rescue_from DeviseLdapAuthenticatable::LdapException do |exception| | |
render :text => exception, :status => 500 | |
end | |
rescue_from Net::LDAP::LdapError do |exception| | |
render :text => "#{exception}. Try to setup an ssh tunnel to your LDAP server.", :status => 500 | |
end | |
def redirect_to_ssl |
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 Project < ActiveRecord::Base | |
attr_accessible :options, :values_attributes | |
accepts_nested_attributes_for :values, allow_destroy:true | |
has_many :values, :class_name => "OptionValue" | |
def options | |
options_hash = {} | |
self.values.each do |v| |
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 Project < ActiveRecord::Base | |
# ... | |
def to_params | |
"#{project_name}" | |
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
= provide(:css_class, "landing") | |
.row-fluid | |
.span12 | |
.banner | |
%section.main | |
%h1{:class => "depth", :title => "Ruby on Rails Theme Marketplace"} | |
Ruby on Rails Themes | |
.sub-header | |
%h2 Open Marketplace |
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> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.1"></script> | |
<style type="text/css"> | |
html, body, #map { | |
width: 100%; |