Skip to content

Specify which railties we want to require #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/helpers/markdown_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ def markdown
end

def markdown_render(md)
sanitize markdown.render md
sanitize find_and_preserve markdown.render md
end
end
4 changes: 2 additions & 2 deletions app/serializers/schema_blogpost_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def base
'datePublished': entry.created_at.strftime('%Y-%m-%d'),
'dateModified': entry.updated_at.strftime('%Y-%m-%d'),
'articleBody': entry.body,
'image': context.image_url('logo'),
'image': context.image_url('logo.png'),
'inLanguage': 'en-US',
'copyrightYear': entry.created_at.year,
'keywords': [entry.channel_name, 'MagmaLabs TIL', 'BlogPost', 'Today I Learned'],
Expand Down Expand Up @@ -56,7 +56,7 @@ def publisher
'url': 'https://www.magmalabs.io',
'logo': {
'@type': 'ImageObject',
'url': context.image_url('magma-logo')
'url': context.image_url('magma-logo.svg')
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/serializers/schema_organization_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def to_jsonld_data
'@context': 'http://schema.org',
'@type': 'Organization',
'url': context.root_url,
'logo': context.image_url('magma-logo')
'logo': context.image_url('magma-logo.svg')
}.merge(same_as).to_json
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/posts/_post.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.post__content.copy
%h1= link_to post.title, post

= find_and_preserve markdown_render post.body
= markdown_render post.body
%div.footer
- if content_for?(:social)
%p.post__social= content_for :social
Expand Down
12 changes: 11 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@

require_relative 'boot'

require 'rails/all'
%w(
active_record/railtie
action_controller/railtie
action_view/railtie
action_mailer/railtie
).each do |railtie|
begin # rubocop:disable Style/RedundantBegin
require railtie
rescue LoadError
end
end

Bundler.require(*Rails.groups)

Expand Down