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
Document(#70259050585960) expected, got "" which is an instance of String(#70259013172680) | |
class Notification < ApplicationRecord | |
has_and_belongs_to_many :documents | |
has_many :users | |
has_many :marketers | |
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
" Delete current file | |
" ------------------------- | |
map <Leader>df :call delete(expand('%')) \| bdelete!<CR>" |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta name="generator" content= | |
"HTML Tidy for Linux (vers 25 March 2009), see www.w3.org" /> | |
<title></title> | |
</head> |
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
= form_for([:admin, @staff]) do |f| | |
.row.mt-5 | |
.col-sm-12 | |
.form-group | |
= f.label :specializations | |
.form-group | |
= f.select(:specialization_ids, options_from_collection_for_select(Specialization.all, 'id', 'title', f.object.specialization_ids), {}, multiple: true, class: 'chosen-select form-control') |
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
%h1 | |
hello | |
- detail_subs.each do |sub| | |
.form-group | |
= sub.title | |
= binding.pry | |
= select_tag(:details, options_for_select(sub.details.pluck('title', 'id'), entry.detail_ids), multiple: true, class: 'chosen-select form-control') | |
:javascript | |
$(function() { |
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
- @detail_subs.each do |sub| | |
.form-group | |
= sub.title | |
= f.select(:detail_category_ids, options_from_collection_for_select(sub.details, 'id', 'title'), {}, class: 'chosen-select-detail form-control') | |
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
pages_controller.rb | |
def new | |
@pages_json = Page.all.map do |page| | |
{"name": page.title, "url": page.meta_slug} | |
end | |
@final_pages = @pages_json.to_json | |
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
// This file is automatically compiled by Webpack, along with any other files | |
// present in this directory. You're encouraged to place your actual application logic in | |
// a relevant structure within app/javascript and only use these pack files to reference | |
// that code so it'll be compiled. | |
require('jquery') | |
require("@rails/ujs").start() | |
require("turbolinks").start() | |
require("@rails/activestorage").start() | |
require("channels") |
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 Page < ApplicationRecord | |
extend FriendlyId | |
friendly_id :meta_slug, use: :slugged | |
has_one_attached :banner | |
def related_pages | |
pages_this_relates_to + pages_related_to_this | |
end | |
has_and_belongs_to_many :pages_this_relates_to, |
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
[ | |
show_post_snippets post_type="staff" post_ids="17192" taxonomy="specialization" terms="" number_of_columns="3" post_count="1" image_size="small" hide_thumbnail="false" title="" no_margin="false" enable_sorting="true" | |
] | |
[/show_post_snippets] |