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
<li class="string input required stringish" id="widget_attr_input"> | |
<label class=" label" for="widget_attr"> | |
My Label<abbr title="required">*</abbr> | |
</label> | |
<input id="widget_attr" name="widget[attr]" required="required" type="text"> | |
<div class="extra-content-class">My extra HTML Here</div> | |
<p class="inline-hints">My Hint</p> | |
</li> |
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 Formtastic | |
module Inputs | |
module Base | |
module Html | |
def extra_html | |
template.content_tag(:div, Formtastic::Util.html_safe(extra_html_text),:class => (options[:extra_html_class] || 'extra-html')) if extra_html? | |
end | |
def extra_html? | |
extra_html_text.present? && !extra_html_text.kind_of?(Hash) |
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 Formtastic | |
module Inputs | |
module Base | |
module Wrapping | |
def input_wrapping(&block) | |
template.content_tag(:li, | |
[template.capture(&block), error_html, hint_html].join("\n").html_safe, | |
wrapper_html_options | |
) | |
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
<li class="string input required stringish" id="widget_attr_input"> | |
<label class=" label" for="widget_attr"> | |
My Label<abbr title="required">*</abbr> | |
</label> | |
<input id="widget_attr" name="widget[attr]" required="required" type="text"> | |
<!-- I WANT TO ADD SOME HTML HERE --> | |
<p class="inline-hints"> | |
My Hint | |
</p> | |
</li> |
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
#!/bin/sh | |
# | |
# This script will be executed *after* all the other init scripts. | |
# You can put your own initialization stuff in here if you don't | |
# want to do the full Sys V style init stuff. | |
touch /var/lock/subsys/local | |
#start nginx | |
/usr/local/nginx/sbin/nginx |
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
user nobody; | |
worker_processes 1; | |
error_log /usr/local/nginx/logs/error.log warn; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /usr/local/nginx/conf/mime.types; |
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('mongoose') | |
var express = require('express') | |
, resource = require('express-resource') | |
, app = express.createServer(); | |
// SET UP RESOURCES | |
var merchants = app.resource('merchants', require('./resources/merchant')); | |
var products = app.resource('products', require('./resources/product')); | |
// NEST RESOURCE |
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
exports.index = function(req, res){ | |
res.send('product index'); | |
}; | |
exports.new = function(req, res){ | |
res.send('new product'); | |
}; | |
exports.create = function(req, res){ | |
res.send('create product'); |
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
exports.index = function(req, res){ | |
res.send('merchant index'); | |
}; | |
exports.new = function(req, res){ | |
res.send('new merchant'); | |
}; | |
exports.create = function(req, res){ | |
res.send('create merchant'); |
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('mongoose') | |
var express = require('express') | |
, resource = require('express-resource') | |
, app = express.createServer(); | |
app.listen(3000); | |
console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env); |