This file contains 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
// JST and HAML Assets is used for the templating pre-compilation | |
Backbone.Marionette.Renderer.render = function(template, data) { | |
if (!JST[template]) { | |
throw "Template '" + template + "' not found!"; | |
} | |
return JST[template](data); | |
}; | |
window.MyApp = new Backbone.Marionette.Application(); |
This file contains 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
$:.push File.expand_path("../lib", __FILE__) | |
# Maintain your gem's version: | |
require "backbone-bundle/version" | |
# Describe your gem and declare its dependencies: | |
Gem::Specification.new do |s| | |
s.name = "backbone-bundle" | |
s.version = BackboneBundle::VERSION | |
s.authors = ["Prevole"] |
This file contains 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 Admin | |
class AdminController < ApplicationController | |
def initialize | |
@datatable_class = "#{self.class.to_s.gsub("Controller", "Datatable")}".constantize | |
@model_class = "Object::#{self.class.to_s.gsub("Admin::", "").gsub("Controller", "").singularize}".constantize | |
@param_path = "#{@model_class.to_s.gsub("::", "_").downcase}" | |
@model_name = "#{@model_class.to_s.demodulize.downcase}" | |
end |
This file contains 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
classe MyClass < ActionView::Helpers::FormBuilder | |
# Some text | |
# @param [String|Symbol] name Some text too | |
# @param [Hash] *args Options | |
# @option *args [Boolean ]:option_name Option description | |
%w[text_field password_field].each do |method_name| | |
define_method(method_name) do |name, *args| | |
# ... some code there ... | |
end | |
end |
This file contains 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
group :development, :test do | |
# RSpec | |
gem "rspec-rails" | |
gem "factory_girl_rails" | |
gem "database_cleaner" | |
gem "shoulda-matchers", :git => "https://github.com/thoughtbot/shoulda-matchers.git" | |
gem "capybara" | |
# Spork | |
gem "spork-rails"#, "> 0.9.0.rc" |
This file contains 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 ".../mymodel" | |
FactoryGirl.define do | |
factory :mymodel, :class => MyModel do |m| | |
end | |
end |
This file contains 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
/lib | |
/generators | |
/Amazing | |
/install | |
/install_generator.rb | |
/templates | |
/create_settings.rb |
This file contains 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
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
probedockSetup: { | |
all: {} | |
}, | |
probedockPublish: { | |
all: {} |