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
| def form_for_login(&block) | |
| form_for(resource, | |
| :as => resource_name, | |
| :url => session_path(resource_name), | |
| :html => { | |
| :class => 'navbar-form navbar-right', | |
| :role => 'login'}) do block | |
| yield | |
| 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 House < ActiveRecord::Base | |
| has_many :house_classes | |
| has_many :students, :through => :house_classes | |
| has_many :referrals | |
| has_one :hoh | |
| 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
| Oct 8 15:18:47 MacbookPro fontd[260]: BUG in libdispatch client: dispatch_mig_server: mach_msg() failed (ipc/send) invalid memory - 0x1000000c | |
| Oct 8 15:18:47 MacbookPro parentalcontrolsd[722]: StartObservingFSEvents [849:] -- *** StartObservingFSEvents started event stream | |
| Oct 8 15:18:52 MacbookPro distnoted[728]: # distnote server agent absolute time: 38.777699557 civil time: Wed Oct 8 15:18:52 2014 pid: 728 uid: 89 root: no | |
| Oct 8 15:19:06 MacbookPro com.apple.SecurityServer[15]: Session 100012 created | |
| Oct 8 15:19:23 MacbookPro mds_stores[220]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Error) IndexGeneral in void setAttributes(si_set_attr_ctx *, Boolean):Couldn't update index oid:12019590 options:10 updateErr:-1 resolveErr:2 | |
| -- Must have died here: | |
| Oct 8 15:20:18 MacbookPro apsd[80]: Failed to send activation record to service com.apple.ManagedClient.enroll | |
| Oct 8 15:22:18 MacbookPro mds[56]: (Normal) Volume: volume:0x7fe256800000 ********** Bootstrapped Creating a default stor |
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 { | |
| products *product = [self.products objectAtIndex:indexPath.row]; | |
| [self.navController performSegueWithIdentifier:@"PushJobForm" sender:product]; | |
| } |
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) someSetupMethod { | |
| UIView *view = [UIView new]; | |
| view.userInteractionEnabled = YES; | |
| // Target is self, self is the controller that you're in right now and will call the method iGotTapped: on itself. | |
| UIGestureRecognizer *tap = [[UIGestureRecognizer alloc] initWithTarget:self action:@selector(iGotTapped:)]; | |
| // addGesture to view | |
| [view addGestureRecognizer:tap]; | |
| } |
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
| // | |
| // ViewController.m | |
| // comprintapp | |
| // | |
| // Created by Ellis Gray on 8/01/2015. | |
| // Copyright (c) 2015 Ellis Gray. All rights reserved. | |
| // | |
| #import "ViewController.h" | |
| #import "NavController.h" |
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 <UIKit/UIkit.h> | |
| @interface TableViewController : UIViewController | |
| @property (nonatomic) UITableView *tableView; | |
| @end | |
| @implementation TableViewController <UITableViewDelegate, UITableViewDataSource, MyCellControlProtocol> |
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)awakeFromNib { | |
| [super awakeFromNib]; | |
| // tap and call boxTapped | |
| UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(boxTapped:)]; | |
| tap.numberOfTapsRequired = 1; | |
| tap.cancelsTouchesInView = NO; | |
| // Some outlet views i wanna tap on | |
| NSArray *controls = @[self.brandNewBox, self.reprintBox, self.alterExistingBox, self.suppliedBox, self.alterSuppliedBox]; | |
| // Assign tap gesture to all those views | |
| for (UIView *controlView in controls) { |