Skip to content

Instantly share code, notes, and snippets.

<%= check_box_tag "completed", t.id, t.completed, :class => "completed",
:onclick =>
:url => {
:action => :completed, :controller => 'tasks'
}
%>
$(".completed").live("change", function(task) {
$.ajax({
url: "/admin/tasks/completed",
beforeSend: function() { alert("Hi"+task) },
data: "id="+task,
success: function() { alert('Bye') }
});
});
Routing Error
No route matches {:action=>"show", :controller=>"admin/tasks"}
da:
contact:
new:
title: Kontakt os
location: Vores beliggenhed
activerecord:
attributes:
contact:
name: Navn
@Znow
Znow / gist:2399733
Created April 16, 2012 16:12 — forked from bsodmike/gist:2399719
Agile Git Workflow

First fetch origin

mdesilva@mbpi7 [06:45:00] abtion/exact {ruby-1.9.2@rails32x} [development] 
-> % git fo
remote: Counting objects: 29, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 20 (delta 16), reused 0 (delta 0)
Unpacking objects: 100% (20/20), done.
From psi.abtion.com:clientele/exact
Daniel:exact znowm4n$ rake -t
** Invoke default (first_time)
** Invoke spec (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
** Invoke db:test:load (first_time)
@Znow
Znow / application.rb
Created March 24, 2012 18:00
config/locales/views/contact/
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
config.i18n.default_locale = :da
class VideosController < ApplicationController
before_filter :authenticate_user!, :except => [:index, :show]
load_and_authorize_resource
def index
@videos = Panda::Encoding.all
#Panda.get('/videos.json')
end
def show
--- !ruby/object:User
attributes:
id:
email: ''
encrypted_password: ''
reset_password_token:
reset_password_sent_at:
remember_created_at:
sign_in_count: 0
current_sign_in_at:
Started POST "/admin/users" for 192.168.233.1 at 2012-03-08 09:16:20 +0100
Processing by Admin::UsersController#create as HTML
Parameters: {"utf8"=>"â", "authenticity_token"=>"ZCRdr/sWW8N/QKklxyOtqFElEtanourFkn6WeP3nQGU=", "user"=>{"name"=>"Test2", "email"=>"test2@test.dk", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"visitor"}, "commit"=>"Gem"}
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
(0.1ms) begin transaction
(0.1ms) rollback transaction