Skip to content

Instantly share code, notes, and snippets.

View wethu's full-sized avatar

Ellis wethu

  • Ellis Gray
  • Gold Coast
View GitHub Profile
class Job < ActiveRecord::Base
serialize :properties, Hash
attr_accessor :fields
def initialize
@fields = property_fields
super
end
module JobsHelper
def other_field_for name, field, values
radio_button_tag name, values.include?(field) ? nil : field, checked_special(field, values), class: "radio-other"
content_tag :label do
content_tag :input, nil, type: "text", class: "size-other", value: values.include?(field) ? nil : field
end
end
end
I, [2014-04-16T06:56:29.258863 #1745] INFO -- : Started GET "/jobs?page=2" for 192.168.1.1 at 2014-04-16 06:56:29 +1000
I, [2014-04-16T06:56:29.370805 #1745] INFO -- : Processing by JobsController#index as HTML
I, [2014-04-16T06:56:29.370914 #1745] INFO -- : Parameters: {"page"=>"2"}
I, [2014-04-16T06:56:29.392292 #1745] INFO -- : Completed 401 Unauthorized in 21ms
I, [2014-04-16T06:56:29.475797 #1745] INFO -- : Started GET "/users/sign_in" for 192.168.1.1 at 2014-04-16 06:56:29 +1000
I, [2014-04-16T06:56:29.480881 #1745] INFO -- : Processing by Devise::SessionsController#new as HTML
I, [2014-04-16T06:56:29.549565 #1745] INFO -- : Rendered devise/sessions/new.html.erb within layouts/application (39.2ms)
I, [2014-04-16T06:56:29.620787 #1745] INFO -- : Completed 200 OK in 140ms (Views: 113.6ms | ActiveRecord: 2.7ms)
I, [2014-04-16T06:56:29.632056 #1745] INFO -- : Started GET "/stylesheets/devise/sessions.css" for 192.168.1.1 at 2014-04-16 06:56:29 +1000
F, [2014-04-16T06:56:29.634503 #1745] FATAL -
@implementation
- (void)viewDidLoad {
[super viewDidLoad];
[self loadClientDetails];
}
// This is probably achieved a better way, could be the issue
- (void)loadClientDetails {
self.businessName.text = self.client.businessName;
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// Segue into Client detail tvc if splitviewcontroller
static NSString *segueIdentifier = @"showClientDetail";
UITableViewController *detailView = [self.splitViewController.viewControllers objectAtIndex:1];
if (![detailView isKindOfClass:[CPClientDetailTableViewController class]]) {
[self performSegueWithIdentifier:segueIdentifier sender:nil];
}
#import "AppDelegate.h"
#import "CPNavigationBar.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Setup Core Data.
// Display the main screen.
<table class="table">
<th width="20%">Time/Date Created</th>
<th width="80%">Client/Product</th>
<% @jobs.each do |job| %>
<% present job do |job_presenter| %>
<% job_presenter.check_status %>
<tr>
<td><%= job_presenter.date_time_graphic %></td>
<!-- <td> -->
<%= content_tag :td, :class => job_presenter.job_status do %>
class Controller < ApplicationController
# This will not increment each child
def index
@form = Form.new(Parent.new)
end
end
class Ability
include CanCan::Ability
def initialize(user)
# Define abilities for the passed in user here. For example:
#
# user ||= User.new # guest user (not logged in)
# if user.admin?
# can :manage, :all
# else
#import "CPRObjectLoader.h"
#import "CPRObjectManager.h"
#import "CPRPersistentStack.h"
// Added these to see if the frameworks wernt' getting linked but they were
#import <CoreData/CoreData.h>
#import <RestKit/RestKit.h>
@interface CPRObjectLoader()