somewhat better action_text integration, still wip

This commit is contained in:
Torsten 2022-12-24 13:12:25 +02:00
parent fe96889200
commit 3c3882e6b3
8 changed files with 19 additions and 4 deletions

View File

@ -10,5 +10,10 @@
* files in this directory. Styles in this file should be added after the last require_* statement. * files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope. * It is generally better to create a new file per style scope.
* *
*= require actiontext
*= require_self *= require_self
*/ */
.trix-content h1 {
font-size: 1.8em;
line-height: 1.2;
}

View File

@ -10,5 +10,5 @@
} }
} }
*/
@import 'actiontext.css'; @import 'actiontext.css';
*/

View File

@ -48,6 +48,6 @@ class MembersController < ApplicationController
# Only allow a list of trusted parameters through. # Only allow a list of trusted parameters through.
def member_params def member_params
params.require(:member).permit(:name, :public) params.require(:member).permit(:name, :public, :bio)
end end
end end

View File

@ -4,6 +4,7 @@ class Member < ApplicationRecord
devise :database_authenticatable, :registerable,:confirmable, devise :database_authenticatable, :registerable,:confirmable,
:recoverable, :rememberable, :validatable :recoverable, :rememberable, :validatable
has_rich_text :bio
def admin? def admin?
true true

View File

@ -6,8 +6,8 @@
%meta{:content => "width=device-width,initial-scale=1", :name => "viewport"}/ %meta{:content => "width=device-width,initial-scale=1", :name => "viewport"}/
= csrf_meta_tags = csrf_meta_tags
= csp_meta_tag = csp_meta_tag
= stylesheet_link_tag "tailwind" , "data-turbo-track": "reload"
= stylesheet_link_tag "application" = stylesheet_link_tag "application"
= stylesheet_link_tag "tailwind" #, "inter-font", "data-turbo-track": "reload"
= javascript_importmap_tags = javascript_importmap_tags
%body %body

View File

@ -13,5 +13,8 @@
.field .field
= f.label :public = f.label :public
= f.check_box :public = f.check_box :public
.field
= f.label :Bio
= f.rich_text_area :bio
.actions .actions
= f.submit 'Save' = f.submit 'Save'

View File

@ -3,6 +3,9 @@
%p %p
%b Name: %b Name:
= @member.name = @member.name
%p
%b Bio:
= @member.bio
%p %p
%b Public: %b Public:
= @member.public = @member.public

View File

@ -41,6 +41,9 @@ Rails.application.configure do
config.action_mailer.perform_caching = false config.action_mailer.perform_caching = false
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
routes.default_url_options = { host: 'localhost', port: 3000 }
# Print deprecation notices to the Rails logger. # Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log config.active_support.deprecation = :log