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
$('.splitter').draggable({ | |
axis: 'x', | |
containment: '#content', | |
distance: 0, | |
drag: function(event, ui) { | |
var width = $('#content').width(); | |
$('#content .leftpane').css({ width: ui.position.left + 'px' }); | |
$('#content .rightpane').css({ | |
left: ui.position.left + 1 + 'px', | |
width: (width - ui.position.left + 1) + 'px' |
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
<% form_tag :search, :url => asdf, :html => { :id => 'search_form' } do %> | |
<%= text_field_tag :search %> | |
<%= submit_tag 'zoeken' %> | |
<% end %> | |
<div id="search_results"></div> | |
$('#search_form').live('submit', function(event) { | |
event.preventDefault(); | |
$.post($(this).attr('action'), $(this).serialize(), null, 'script'); | |
}); |
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/rails server | |
WARNING: #<NoMethodError: undefined method `>' for nil:NilClass> | |
# -*- encoding: utf-8 -*- | |
Gem::Specification.new do |s| | |
s.name = %q{abstract} | |
s.version = "1.0.0" | |
s.required_rubygems_version = nil if s.respond_to? :required_rubygems_version= | |
s.authors = ["makoto kuwata"] |
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
rails g devise_install | |
/opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-0.9.7/lib/bundler/resolver.rb:97:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement | |
/Users/jeroen/.bundle/ruby/1.9.1/bundler/gems/devise-d498cf3a4e1a3fef3f4f071d4feec6a489efe480-master/lib/devise.rb:71:in `<module:Devise>': undefined method `mattr_accessor' for Devise:Module (NoMethodError) | |
from /Users/jeroen/.bundle/ruby/1.9.1/bundler/gems/devise-d498cf3a4e1a3fef3f4f071d4feec6a489efe480-master/lib/devise.rb:1:in `<top (required)>' | |
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-0.9.7/lib/bundler/runtime.rb:41:in `require' | |
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-0.9.7/lib/bundler/runtime.rb:41:in `block (2 levels) in require' | |
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-0.9.7/lib/bundler/runtime.rb:36:in `each' | |
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-0.9.7/lib/bundler/runtime.rb:36:in `block in require' | |
from /opt/local/lib/ruby1 |
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 File.expand_path('../boot', __FILE__) | |
module Toggle | |
class Application < Rails::Application | |
# Settings in config/environments/* take precedence over those specified here. | |
# Application configuration should go into files in config/initializers | |
# -- all .rb files in that directory are automatically loaded. | |
# Add additional load paths for your own custom dirs | |
# config.load_paths += %W( #{config.root}/extras ) |
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
# Use Bundler (preferred) | |
begin | |
require File.expand_path('../../.bundle/environment', __FILE__) | |
rescue LoadError | |
require 'rubygems' | |
require 'bundler' | |
Bundler.setup | |
# To use 2.x style vendor/rails and RubyGems | |
# |
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
rake routes --trace | |
(in /Users/jeroen/Projects/toggle) | |
/opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-0.9.7/lib/bundler/resolver.rb:97:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement | |
** Invoke routes (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
rake aborted! | |
undefined method `devise_modules' for #<Module:0x0000010329b760> | |
/Users/jeroen/.bundle/ruby/1.9.1/bundler/gems/devise-d498cf3a4e1a3fef3f4f071d4feec6a489efe480-master/lib/devise/mapping.rb:71:in `for' | |
/Users/jeroen/.bundle/ruby/1.9.1/bundler/gems/devise-d498cf3a4e1a3fef3f4f071d4feec6a489efe480-master/lib/devise/rails/routes.rb:99:in `block in devise_for' |
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> | |
<title>Thickborder</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<link href="../reset-min.css" media="screen" rel="stylesheet" type="text/css" /> | |
<link href="thickborder.css" media="screen" rel="stylesheet" type="text/css" /> | |
</head> | |
<body> | |
<nav> |
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
def teacher_plus?(level) | |
products.first( | |
:joins => :levels, | |
:conditions => [ "(licenses.expires_at > ?) AND domains.id = ?", Time.now.to_date, level ], | |
:order => "products.product_type DESC").try(:product_type) == 'teacher_plus' | |
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
$(document).ready(function() { | |
// Define the dateFormat for the datepicker | |
$.datepicker._defaults.dateFormat = 'dd M yy'; | |
/** | |
* Sets the date for each select with the date selected with datepicker | |
*/ | |
$('input.ui-date-text').live("change", function() { | |
var sels = $(this).siblings("select:lt(3)"); | |
var d = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $(this).val() ); |
OlderNewer