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 up | |
| patients = Patient.find(:all) | |
| patients.each do |patient| | |
| full_name = patient.name.split | |
| patient.update_attributes(first_name: full_name[0], last_name: full_name[1]) | |
| end | |
| end | |
| def down |
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
| if full_name.size == 3 | |
| patient.update_attributes(first_name: full_name[0,1], last_name: full_name[2]) | |
| else | |
| patient.update_attributes(first_name: full_name[0], last_name: full_name[1]) | |
| 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
| PG::Error: ERROR: relation "facilities" does not exist | |
| LINE 5: WHERE a.attrelid = '"facilities"'::regclass | |
| ^ | |
| : SELECT a.attname, format_type(a.atttypid, a.atttypmod), | |
| pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod | |
| FROM pg_attribute a LEFT JOIN pg_attrdef d | |
| ON a.attrelid = d.adrelid AND a.attnum = d.adnum | |
| WHERE a.attrelid = '"facilities"'::regclass | |
| AND a.attnum > 0 AND NOT a.attisdropped | |
| ORDER BY a.attnum |
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
| NoMethodError in Manage/progress_reports#index | |
| Showing /Users/CS_Spare/.rvm/gems/ruby-1.9.3-p125@carecom/gems/datagrid-0.6.2/app/views/datagrid/_row.html.erb where line #3 raised: | |
| undefined method `name' for #<Patient:0x007ffbadc912a0> | |
| Extracted source (around line #3): | |
| 1: <tr class="<%= options[:cycle] && cycle(*options[:cycle]) %>"> | |
| 2: <% grid.columns.each do |column| %> | |
| 3: <td class="<%= datagrid_column_classes(grid, column) %>"><%= datagrid_format_value(grid, column, asset) %></td> |
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
| <?php | |
| function csextra_block($op = 'list', $delta = 0, $edit = array()) | |
| { | |
| switch ($op) { | |
| case 'list': | |
| $blocks[0]['info'] = t('Send To a Friend Form'); | |
| $blocks[1]['info'] = t('Sign Up for Our Newsletter'); | |
| $blocks[2]['info'] = t('Event Ticket Button`'); | |
| return $blocks; |
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 @Feed | |
| constructor: (@func)-> | |
| @callbacks = $.Callbacks() | |
| init: -> | |
| @subscribe( @func ) | |
| subscribe: => | |
| @callbacks.add( @func ) | |
| publish: (args)=> | |
| if args.length < 1 | |
| @callbacks.fire @func |
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
| <?php | |
| $root = $_SERVER['DOCUMENT_ROOT']; | |
| chdir($root); | |
| $path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/'); | |
| if(file_exists($root.$path)) | |
| { | |
| if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/') | |
| { | |
| header('location: '.rtrim($path,'/').'/'); |
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
| /etc /usr/local/bin/postgres -D /usr/local/var/postgres -r /usr/local/var/postgres/server.log [ruby-1.9.3-p125] | |
| FATAL: could not create shared memory segment: Invalid argument | |
| DETAIL: Failed system call was shmget(key=5432001, size=14442496, 03600). | |
| HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 14442496 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections. | |
| If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for. | |
| The PostgreSQL documentation contains more information about shared memory configuration. |
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
| .feed-section-header { | |
| margin: 0; | |
| font-size: 1.1em; | |
| $groups: community $community \70, teams $teams \72, college $college \71, for-you $gray \6b; | |
| @each $group in $groups { | |
| &.#{nth($group, 1)} { | |
| color: #{nth($group, 2)}; | |
| .feed-icon { |