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
using System; | |
using Xamarin.Forms; | |
namespace MyApp | |
{ | |
public interface ICanBeValidated | |
{ | |
Action<bool> ValidateChange { get; set; } | |
bool IsValidated { get; set; } |
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
# /etc/nginx/sites-enabled/berlin | |
upstream spree.ryanbigg.com { | |
# fail_timeout=0 means we always retry an upstream even if it failed | |
# to return a good HTTP response (in case the Unicorn master nukes a | |
# single worker for timing out). | |
# for UNIX domain socket setups: | |
server unix:/tmp/berlin.socket fail_timeout=0; | |
} |
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
<?php session_start(); $_SESSION; ?> | |
[two-thirds-column] | |
<h3>Har du spørgsmål?</h3> | |
Så kontakt os på nedenstående formular og vi vil besvare hurtigst muligt. | |
[contact-form] | |
[/two-thirds-column] | |
[one-third-column] |
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
$('.personality-rating').raty({ | |
starOff : 'star-off.png', | |
starOn : 'star-on.png', | |
path : '/assets/', | |
space : false, | |
width : 100, | |
score : $('.personality-rating').data('rating'), | |
click : function(score, evt) { | |
var url = '/admin/contractors/' + $('.rating-header').attr('id') + '/rating'; | |
console.log('ID: ' + $(this).attr('id') + '\nscore: ' + score + '\nevent: ' + evt + '\nurl: ' + url); |
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
def update | |
@task = Task.find_by_id(params[:id]) | |
respond_to do |format| | |
if @task.update_attributes(params[:task]) | |
flash[:success] = "<strong>Success!</strong> #{@task.subject} was successfully edited.".html_safe | |
end | |
format.js { render :template => "admin/tasks/update.js.erb", | |
:locals => { :task => @task, :redirect_path => } #admin_tasks_path | |
} # update.js.erb |
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
<div id="createTask<%= task.id %>" class="modal hide fade custom_modal" style="display: none; "> | |
<%= form_for [:admin, task], :url => admin_task_path(task.id), :remote => true, :html => { :id => "new-task-form" } do |f| %> | |
<div class="modal-header"> | |
<h3> | |
Add New Task | |
<span class="pull-right"> | |
<%= submit_tag "Save", :class => 'btn btn-primary custom_button' %> | |
<a href="#" data-dismiss="modal" class="btn btn-small custom_button_dark">Cancel</a> | |
</span> | |
</h3> |
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
Started POST "/admin/tasks" for 127.0.0.1 at 2012-04-30 11:58:53 +0200 | |
Processing by Admin::TasksController#create as JS | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"6Rb8LRbmnOqdSUqQ+xJfyOHinwlLYThvfksXoTicIoQ=", "task"=>{"task_type"=>"Follow-up", "subject"=>"dsadsadsadsa", "responsible"=>"1", "client"=>"3", "deadline"=>"2012-04-30 11:58"}, "commit"=>"Save"} | |
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 | |
Completed 500 Internal Server Error in 2ms | |
ActiveRecord::AssociationTypeMismatch (Client(#70287180650000) expected, got String(#70287161020800)): | |
app/controllers/admin/tasks_controller.rb:25:in `new' | |
app/controllers/admin/tasks_controller.rb:25:in `create' |
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
<div id="createTask" class="modal hide fade custom_modal" style="display: none;"> | |
<%= form_for [:admin, task], :url => admin_tasks_path, :remote => true, :html => { :id => 'new-task-form' } do |f| %> | |
<div class="modal-header"> | |
<h3> | |
Add New Task | |
<span class="pull-right"> | |
<%= submit_tag "Save", :class => 'btn btn-primary custom_button' %> | |
<a href="#" data-dismiss="modal" class="btn btn-small custom_button_dark">Cancel</a> | |
</span> | |
</h3> |
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
<% content_for :modal_partials do %> | |
<%= render :partial => "/admin/tasks/edit_task_modal", :locals => {:task => t} %> | |
<%= render :partial => "/admin/tasks/delete_task_modal", :locals => {:task => t} %> | |
<% end %> | |
<%# content_for :pre_body_close do | |
<script> | |
alert('hej') | |
$(".completed").live("change", function(el) { | |
$.ajax({ |
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
<tr> | |
<td> | |
<%= check_box_tag "completed", t.id, t.completed, :class => "completed" %> | |
</td> | |
<td><%= t.task_type %></td> | |
<td><%= link_to "#{truncate(t.subject, :length => 20)}", admin_task_path(t) %></td> | |
<td><%= t.responsible(&:name) %></td> | |
<td><%= link_to t.client, admin_client_path(t.client) unless t.client.nil? %></td> | |
<td><%= t.deadline.strftime("%d/%m/%y %H:%M") %></td> | |
<td><%= t.author(&:name) %></td> |
NewerOlder