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 CheckIfDonorIsMemberService | |
def call | |
if Membership.find_by(email: @email) | |
@current_user = Membership.find_by(email: @email) | |
else | |
false | |
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
"url(\"https://www.premierleague.com/resources/prod/c88a89e-636/i/sprites/[email protected]\")" | |
to | |
"https://www.premierleague.com/resources/prod/c88a89e-636/i/sprites/[email protected]" |
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
Error detected while processing function <SNR>46_HighlightEOLWhitespaceExceptCurrentLine: | |
line 1: | |
E461: Illegal variable name: a:exclude_current_line_eol_whitespace_pattern | |
Press ENTER or type command to continue | |
Error detected while processing function <SNR>46_HighlightEOLWhitespaceExceptCurrentLine: | |
line 3: | |
E121: Undefined variable: a:exclude_current_line_eol_whitespace_pattern | |
Press ENTER or type command to continue |
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
Started GET "/presign?filename=bar.jpg" for 127.0.0.1 at 2019-03-16 17:47:32 -0500 | |
Started GET "/presign?filename=foo.pdf" for 127.0.0.1 at 2019-03-16 17:47:32 -0500 | |
Started PATCH "/admin/courses/foobar/lessons/part-1-introduction-to-fun-stuff" for 127.0.0.1 at 2019-03-16 17:48:20 -0500 | |
Processing by Admin::LessonsController#update as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"/5MUr1oLT/vaBhy2wnxiZONrx6c21PYshnIdrZAv8uahgoPglKbNujCTu9tXFB2eakk5Doy5ChyNGYRzHAQPxQ==", "lesson"=>{"title"=>"Part 1: Introduction to Fun stuff", "video_link"=>"https://player.vimeo.com/video/316481875?byline=0&portraitrtrait=0", "documents_attributes"=>{"graphic"=>"{\"id\":\"171e46b1408211f235a504146b72e321.pdf\",\"storage\":\"cache\",\"metadata\":{\"size\":361072,\"filename\":\"TheRealMessiah.pdf\",\"mime_type\":\"application/pdf\"}}"}, "description"=>"<p>This is going to be intrsi</>eresting</p>"}, "uploading_image"=>"", "commit"=>"Update Lesson", "course_id"=>"kaballah-of-you", "id"=>"part-1-introduction-to-fun-stuff |
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 ApplicationHelper | |
def login_logout | |
if current_user.role == 'none' | |
content_tag :li do | |
link_to "Login", login_path | |
end | |
else | |
content_tag :li do | |
link_to "logout", logout_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
.membership-benefits.background-image-holder-login{:style => "background: url(/assets/create-membership-min.jpg);"} |
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
here is the schema of my post model | |
# == Schema Information | |
# | |
# Table name: posts | |
# | |
# id :bigint(8) not null, primary key | |
# author :string | |
# content :text | |
# title :string | |
# excerpt :text |
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
function reloadSubCategories (category, submenu) { | |
if (category && submenu) { | |
$.getScript('/admin/categories/'+ category +'/submenus/'+ submenu +'/subcategories', function(){ | |
var subcat = $('#post_subcategory_id').val(); | |
$("#new_subcategory").attr("action", '/admin/categories/' + category + '/submenus/' + submenu + '/subcategories') | |
$('#new_post').attr('action', '/admin/categories/' + category + "/submenus/" + submenu + '/subcategories/' + subcat + '/posts') | |
}); | |
} else { | |
console.log("miss1") | |
$('#post_subcategory_id').empty(); |
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
.col-sm-4 | |
= f.label :subcategory_id | |
= f.select "subcategory_id", @submenu.subcategories.collect { |o| [ o.title, o.id ] } | |
%button.btn.btn-secondary{"data-target" => "#createsubcategory", "data-toggle" => "modal", :type => "button"} | |
Create Subcategory | |
$('#post_subcategory_id').on('change', function(e){ | |
console.log("I caught the change of the subcategory") | |
var subcatVal = $(this).val(); | |
var category = $(this).closest("form").find("#post_category_id").val(); |
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
.row | |
.col-sm-4 | |
= f.label :category_id | |
= f.select :category_id, Category.all.collect { |o| [ o.title, o.id ] }, { selected: @category.id } | |
%button.btn.btn-secondary{"data-target" => "#createcategory", "data-toggle" => "modal", :type => "button"} | |
Create Category | |
.col-sm-4 | |
= f.label :submenu_id | |
= f.select :submenu_id, @category.submenus.collect { |o| [ o.title, o.id ] } | |
%button.btn.btn-secondary{"data-target" => "#createsubmenu", "data-toggle" => "modal", :type => "button"} |