File tree Expand file tree Collapse file tree 6 files changed +37
-5
lines changed
controllers/better_together
javascript/better_together/controllers
views/better_together/pages Expand file tree Collapse file tree 6 files changed +37
-5
lines changed Original file line number Diff line number Diff line change 1111PATH
1212 remote: .
1313 specs:
14- better_together (0.4.0 )
14+ better_together (0.4.1 )
1515 activerecord-import
1616 activerecord-postgis-adapter
1717 bootstrap (~> 5.3.2 )
Original file line number Diff line number Diff line change 33module BetterTogether
44 # Base application controller for engine
55 class ApplicationController < ActionController ::Base
6+ include ActiveStorage ::SetCurrent
67 include Pundit ::Authorization
78
89 protect_from_forgery with : :exception
Original file line number Diff line number Diff line change 1+ // app/javascripts/better_together/controllers/trix_controller.js
2+
3+ import { Controller } from "@hotwired/stimulus" ;
4+
5+ export default class TrixController extends Controller {
6+
7+ connect ( ) {
8+
9+ // wait for the trix editor is attached to the DOM to do stuff
10+ addEventListener ( "trix-initialize" , function ( event ) {
11+ console . log ( "im inititalized!" ) ;
12+ // ...
13+ // add underline code
14+ // remove buttons code
15+ // add custom icons code here
16+ // ...
17+ } , true ) ;
18+ }
19+ }
Original file line number Diff line number Diff line change 3939
4040 < div class ="row mb-3 ">
4141 <%= form . label :content %>
42- <%= form . rich_text_area :content , class : "form-control#{ ' is-invalid' if page . errors [ :content ] . any? } " %>
42+ <%=
43+ form . rich_text_area :content ,
44+ class : "form-control#{ ' is-invalid' if page . errors [ :content ] . any? } " ,
45+ data : { controller : 'trix' }
46+ %>
4347 <% if page . errors [ :content ] . any? %>
4448 < div class ="invalid-feedback ">
4549 <%= page . errors [ :content ] . join ( ", " ) %>
Original file line number Diff line number Diff line change @@ -40,11 +40,19 @@ class Engine < ::Rails::Engine
4040 require_dependency 'rack/cors'
4141 end
4242
43- config . action_mailer . default_url_options = {
43+ default_url_options = {
4444 host : ENV . fetch ( 'APP_HOST' , 'localhost:3000' ) ,
45- locale : I18n . locale
45+ protocol : ENV . fetch ( 'APP_PROTOCOL' , 'http' ) ,
46+ locale : ENV . fetch ( 'APP_LOCALE' , I18n . locale )
4647 }
4748
49+ routes . default_url_options =
50+ config . action_mailer . default_url_options =
51+ config . default_url_options =
52+ default_url_options
53+
54+ config . time_zone = ENV . fetch ( 'APP_TIME_ZONE' , 'Newfoundland' )
55+
4856 initializer 'better_together.importmap' , before : 'importmap' do |app |
4957 app . config . importmap . paths << Engine . root . join ( 'config/importmap.rb' )
5058
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module BetterTogether
4- VERSION = '0.4.0 '
4+ VERSION = '0.4.1 '
55end
You can’t perform that action at this time.
0 commit comments