Skip to content

Instantly share code, notes, and snippets.

View gealgaro's full-sized avatar

German Garcia gealgaro

View GitHub Profile
@gealgaro
gealgaro / gist:3796724
Created September 27, 2012 22:03
TableView Snnipet
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"patientCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell==nil) cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
NSString* letter = [[self sectionsTitlesArray] objectAtIndex:indexPath.section];
NSString* filterString = [NSString stringWithFormat:@"last_name beginswith[cd] '%@'", letter];
NSArray* filteredPatients = [GeneralFunctions filterArrayWithString:filterString objectsToFilter:patients];
cell.textLabel.text = [(Patient *)[filteredPatients objectAtIndex:indexPath.row] fullName];
German-Garcias-MacBook-Pro:group-collect germangarcia$ rake routes
agency_sign_up GET /agency/sign_up(.:format) agency/registrations#new
agency_registration POST /agency/registration(.:format) agency/registrations#create
new_agency_registration GET /agency/registration/new(.:format) agency/registrations#new
agency_root / agency/site#home
new_session GET /sign_in(.:format) agency/sessions#new
session POST /sign_in(.:format) agency/sessions#create
destroy_session /sign_out(.:format) agency/sessions#destroy
agency_sign_in / agency/sessions#new
root / site#home
NoMethodError
Showing .../app/views/layouts/application.html.erb where line #5 raised:
undefined method `key?' for "checkout":String
Extracted source (around line #5):
2: <html>
3: <head>
4: <title>App</title>