had to invent main_app for url helpers to work when engine renders

This commit is contained in:
Torsten 2022-12-21 00:34:11 +02:00
parent 6a2378b8d7
commit 0398a20861
5 changed files with 14 additions and 9 deletions

View File

@ -107,7 +107,7 @@ GEM
coderay (1.1.3)
concurrent-ruby (1.1.10)
crass (1.0.6)
date (3.3.2)
date (3.3.3)
debug (1.7.0)
irb (>= 1.5.0)
reline (>= 0.3.1)
@ -117,9 +117,6 @@ GEM
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise-tailwindcssed (0.1.5)
rails (>= 5.2.3.4, < 7.1)
railties (> 4.0, < 7.1)
diff-lcs (1.5.0)
erubi (1.11.0)
erubis (2.7.0)
@ -333,7 +330,6 @@ DEPENDENCIES
capybara
debug
devise
devise-tailwindcssed
guard-rspec
haml-rails
html2haml

View File

@ -1,2 +1,5 @@
module ApplicationHelper
def main_app
Rails.application.routes.url_helpers
end
end

View File

@ -11,7 +11,11 @@
= link_to "https://www.facebook.com/hubfeenix" , :target => "_blank" do
= image_tag("fb" , class: "h-10 rounded-md")
%li
%a.inline-flex.items-center.justify-center.h-12.px-6.font-medium.tracking-wide.text-white.transition.duration-200.rounded-lg.shadow-md.bg-green-800.hover:bg-blue-800.focus:shadow-outline.focus:outline-none{"aria-label" => "Sign up", :href => "/", :title => "Log in or Sign up"}
- if member_signed_in?
.inline-flex.items-center.justify-center.h-12.px-6.font-medium.tracking-wide.text-white.transition.duration-200.rounded-lg.shadow-md.bg-green-800.hover:bg-blue-800.focus:shadow-outline.focus:outline-none
=link_to current_member.email , main_app.member_path(current_member)
- else
%a.inline-flex.items-center.justify-center.h-12.px-6.font-medium.tracking-wide.text-white.transition.duration-200.rounded-lg.shadow-md.bg-green-800.hover:bg-blue-800.focus:shadow-outline.focus:outline-none{"aria-label" => "Sign up", :href => member_session_url, :title => "Log in or Sign up"}
Login
.lg:hidden.flex.items-center.justify-between
.mr-20

View File

@ -1,7 +1,9 @@
Rails.application.routes.draw do
devise_for :members
resources :members
devise_for :members
mount Merged::Engine => "/merged"
get ":id" , to: "merged/view#view" , id: :id

View File

@ -182,7 +182,7 @@
:updated_at: &2 2022-12-09 17:50:02.733622073 +02:00
:page_id: 2
:index: 1
:image_id: '44'
:image_id: 38
- :template: section_cards
:header: Sizes and kinds
:text: We offer different sizes and different types of studios for artists. There