Skip to content

Instantly share code, notes, and snippets.

View cantonic's full-sized avatar

Can Edremitoglu cantonic

  • Berlin / Germany
View GitHub Profile
Daikoku:cantonic_demo cantonic$ bundle install
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.8)
Using builder (3.0.0)
Using activemodel (3.2.8)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
def show
path = params[:id] || "/"
begin
initialize_client
@dropbox_email = @client.account.email
@files = @client.ls(path)
rescue Exception
redirect_to adveli.new_dropbox_path
end
end
Feature: Dropbox File Sharing
In order to use dropbox
As a teacher, student or principal
I need the possibility to upload and share files via dropbox
@mechanize
Scenario Outline: Visit dropbox page without having a dropbox account linked to account
Given I am logged in as <Role>
And I don't have a dropbox account linked to my account
When I visit the dropbox page
require "csv"
namespace :contact do
desc "Create CSV for all unsold Contacts"
task :create_csv => :environment do
@contact_count = []
cities = City.where(:is_active => true).each do |city|
CSV.open("tmp/csv/#{city.name}-#{Date.today}.csv", "w", {:force_quotes=>true}) do |csv|
csv << ["Anrede", "Name", "Email", "Telefon", "Geburtsdatum", "Anmeldedatum", "Ort"]
contacts = city.contacts.where(:status => 1)
Started GET "/" for 71.28.109.119 at 2012-09-06 15:23:00 +0000
Processing by Adveli::HomeController#index as HTML
Rendered /home/deployer/apps/adveli_demo/shared/bundle/ruby/1.9.1/bundler/gems/adveli-b4f2da4c85a8/core/app/views/adveli/home/index.html.erb within adveli/layouts/application (0.1ms)
Deface: 3 overrides found for 'adveli/layouts/application'
Deface: 'accounts_navigation' matched 1 times with '[data-hook='navigation_buttons']'
Deface: [WARNING] No :original defined for 'accounts_navigation', you should change its definition to include:
:original => '7d863a58a05ec66919b0208b2584c62537b783fa'
Deface: 'classrooms_navigation' matched 1 times with '[data-hook='navigation_buttons']'
Deface: [WARNING] No :original defined for 'classrooms_navigation', you should change its definition to include:
:original => '020f56d2e7ccd126c526e4e8a723c0af02fff3a4'
before_validation :set_uuid, :on => :create
validates :uuid, :uniqueness => true
protected
def set_uuid
if self.uuid.nil?
self.uuid = rand(1..99999).to_s.rjust(5,"0")
end
end
en:
email: "Email"
password: "Password"
sign_up: "Sign up"
username_or_email: "Username or Email"
forgot_password: "Forgot your Password?"
edit_account: "Edit Account"
change_password: "Change your password"
created_by: "created by"
yes: "Yes"
<% @users.each do |user| %>
<%= render "single_user", :user => user %>
<% end %>
-# coding: UTF-8
!!!
%html{:lang => "en"}
%head
%meta{:charset => "utf-8"}
%meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}
%title= content_for?(:title) ? yield(:title) : "cantonic"
= csrf_meta_tags
/ Le HTML5 shim, for IE6-8 support of HTML elements
/[if lt IE 9]
- flash.each do |name, msg|
-if name == :notice
-alert_class = "alert alert-success"
-else
-alert_class = "alert alert-error"
%div{ :class => alert_class }
%a.close{"data-dismiss" => "alert"} ×
= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String)