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
| class Job < ActiveRecord::Base | |
| serialize :properties, Hash | |
| attr_accessor :fields | |
| def initialize | |
| @fields = property_fields | |
| super | |
| 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
| 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 |
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
| 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 - |
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
| @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; |
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
| -(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]; | |
| } | |
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
| #import "AppDelegate.h" | |
| #import "CPNavigationBar.h" | |
| @implementation AppDelegate | |
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
| { | |
| // Setup Core Data. | |
| // Display the main screen. |
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
| <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 %> |
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
| class Controller < ApplicationController | |
| # This will not increment each child | |
| def index | |
| @form = Form.new(Parent.new) | |
| end | |
| 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
| 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 |
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
| #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() |