I hereby claim:
- I am tubbo on github.
- I am tubbo (https://keybase.io/tubbo) on keybase.
- I have a public key whose fingerprint is 36EF CE58 007F FC36 676E A414 A022 AB3D 5CEA 7017
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <%= form_for @project do |f| %> | |
| <% if @project.errors.any? %> | |
| <div id="error_explanation"> | |
| <h2><%= pluralize(@project.errors.count, "error") %> prohibited | |
| this project from being saved:</h2> | |
| <ul> | |
| <% @project.errors.full_messages.each do |msg| %> | |
| <li><%= msg %></li> | |
| <% end %> | |
| </ul> |
| def insert_flash | |
| content_tag :div, class: 'flash' do | |
| flash.each do |name, msg| | |
| if msg.is_a?(String) | |
| concat( content_tag( :div, class: "fade in alert alert-#{ flash_type_to_bootstrap(name) }") do | |
| concat( button_tag( "×".html_safe, class: "close", "aria-hidden" => true, "data-dismiss" => "alert" ) ) | |
| concat( content_tag :div, msg, :id => "flash_#{name}" ) | |
| end ) | |
| end | |
| end |
| _team_special.html.erb | |
| _team_normal.html.erb | |
| _team_keith.html.erb | |
| %body | |
| -if controller_name == 'home' | |
| :javascript | |
| $(document).on('ready page:load', function() { | |
| Shadowbox.init(); | |
| }); |
| def create_migration(table_name, columns="") | |
| utc_now = Time.now.getutc.strftime("%Y%m%d%H%M%S") | |
| class_name = table.classify.pluralize | |
| file "db/migrate/#{utc_now}_create_#{table}.rb", %{ | |
| class Create#{class_name} < ActiveRecord::Migration | |
| def change | |
| create_table(:#{table_name}) do |t| | |
| #{columns} | |
| t.timestamps | |
| end |
| Failures: | |
| 1) PostsController POST create with valid params creates a new Post | |
| Failure/Error: expect { | |
| count should have been changed by 1, but was changed by 0 | |
| # ./spec/controllers/posts_controller_spec.rb:47:in `block (4 levels) in <top (required)>' | |
| 2) PostsController POST create with valid params assigns a newly created post as @post | |
| Failure/Error: assigns(:post).should be_persisted | |
| expected persisted? to return true, got false |
| def get_filters | |
| searchable_named_columns.reduce({}) do |hash, col| | |
| hash[col.send(:name) || col['name']] = col | |
| end | |
| end | |
| def searchable_named_columns | |
| searchable_columns.select { |col| col.respond_to? :name } | |
| end |
| dolphin ♬ rake test --trace | |
| ** Invoke test (first_time) | |
| ** Execute test | |
| ** Invoke test:units (first_time) | |
| ** Invoke db:test:prepare (first_time) | |
| ** Invoke db:abort_if_pending_migrations (first_time) | |
| ** Invoke environment (first_time) | |
| ** Execute environment | |
| config.gem: Unpacked gem bin in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. | |
| config.gem: Unpacked gem bin in vendor/gems not in a versioned directory. Giving up. |
| module ElasticSearch | |
| module RefreshIndex | |
| extend ActiveSupport::Concern | |
| included do | |
| after_save :refresh_index | |
| after_destroy :refresh_index | |
| end | |
| def refresh_index |