Author: Ari Lerner.
AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:
- Module support
- DOM manipulation
- Animations
- Templating
Author: Ari Lerner.
AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:
require 'yaml' | |
require 'erb' | |
require 'ostruct' | |
class Settings < OpenStruct | |
# Settings.new(:google_analytics) | |
def initialize(config_file_base_name) | |
super(YAML.load(ERB.new(File.read(Rails.root.join("config", "#{config_file_base_name}.yml"))).result)[Rails.env]) | |
end |
//= require jquery | |
//= require best_in_place | |
//= require jquery.purr | |
//= require active_admin/base | |
$(document).ready(function() { | |
$(".best_in_place").best_in_place() | |
$('.best_in_place').bind("ajax:success", function () {$(this).closest('tr').effect('highlight'); }); | |
$(document).on('best_in_place:error', function(event, request, error) { |
//....add this in app/assets/javascript/active_admin.js | |
$(function(){ | |
// CONFIGURE PANELS COLLAPSER | |
$(".panel[data-panel]").each(function(){ | |
var $this = $(this); | |
var $a = $("<a href='javascript:void(null)'>").on("click",function(event){ | |
$(this).closest(".panel").find(".panel_contents").each(function(){ | |
$(this).slideToggle(); | |
}); | |
$(this).closest("h3").each(function(){ |
If you just want to fix the issue quickly, scroll down to the "solution" section below.
If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g
, you may see an error like this:
$ npm update npm -g
Updated for Rails 4.0.0+
Set up the bower
gem.
Follow the Bower instructions and list your dependencies in your bower.json
, e.g.
// bower.json
{
# ... | |
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
root html; | |
index index.html index.htm; | |
} |