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
Bundler could not find compatible versions for gem "actionpack": | |
In Gemfile: | |
haml-rails was resolved to 0.9.0, which depends on | |
actionpack (>= 4.0.1) | |
kaminari was resolved to 0.17.0, which depends on | |
actionpack (>= 3.0.0) | |
lograge was resolved to 0.11.2, which depends on | |
actionpack (~> 5.2.4) |
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 Supplier < ApplicationRecord | |
has_many :supplier_results | |
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
get 'videos/:id/coveritlive/enable', controller: 'coveritlive', action: :enable, as: :coveritlive_enable | |
get 'videos/:id/coveritlive/disable', controller: 'coveritlive', action: :disable, as: :coveritlive_disable | |
get 'videos/:id/coveritlive/reset', controller: 'coveritlive', action: :reset, as: :coveritlive_reset | |
get 'videos/:id/coveritlive/start', controller: 'coveritlive', action: :start, as: :coveritlive_start | |
get 'videos/:id/coveritlive/end', controller: 'coveritlive', action: :end, as: :coveritlive_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
how to structure builder so filter requires both hidden be false AND approved be true? | |
right now, 'approved' just replaces the 'hidden' line. | |
query = Jbuilder.encode do |json| | |
json.query do | |
json.multi_match do | |
json.query term | |
json.fields ['title^2', 'description', 'tags.name'] | |
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
<table> | |
<%= f.fields_for :daughters do |daughters_form| %> | |
<tr> | |
<td> | |
Daughter Name: | |
</td> | |
<td> | |
<%= daughters_form.text_field :name %> | |
</td> | |
<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
server { | |
listen 81; | |
server_name sempermedusa.com/blog; | |
return 301 http://$server_name$request_uri; | |
} |
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
<tr> | |
<td class="my-label"> | |
<input type="checkbox" name="user[role_ids][]" id="role_1" value="1" checked="checked" /> | |
</td> | |
<td class="value"> | |
<label for="role_1">Approver</label> | |
</td> | |
</tr> |
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 ActiveModel | |
class Errors | |
def full_messages | |
map do |attribute, message| | |
if attribute == :name | |
full_message(' ', message) | |
else | |
full_message(attribute, message) | |
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
rspec ./spec/models/video_spec.rb | |
.....F | |
Failures: | |
1) Video#last_used works with one video | |
Failure/Error: expect(Video.last_used.usec).to eq video.updated_at.usec | |
expected: 840199 | |
got: 0 |
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
5 def self.top_player | |
6 averages = {} | |
7 joins(:games).group(:id).each {|player| averages[player.name.to_sym] = player.games.average(:score).to_i} | |
8 averages.max_by{|k,v| v}[0] | |
9 end |
NewerOlder