Forum https://discourse.hanamirb.org – Code of Conduct http://hanamirb.org/community/#code-of-conduct
waiting-for-dev on prepare_for_hanami_routes_command
Fix HEAD routes generating empt… Add a reader for the router ins… Leverage internal state on `Han… and 3 more (compare)
waiting-for-dev on prepare_for_hanami_routes_command
Move tests on router inspection… Fix router taking resolved endp… Remove unused #routes instance … (compare)
waiting-for-dev on prepare_for_hanami_routes_command
Fix HEAD routes generating empt… Add a reader for the router ins… Leverage internal state on `Han… and 3 more (compare)
timriley on combine-slices-and-applications-2
Update docs Remove unneeded root method Bring all load_router details t… and 1 more (compare)
Dry::Struct
.
Hi , I've ran this migration, which completed without errors, but when I run the server below:
Hanami::Model.migration do
change do
alter_table :segments do
add_column :ts_content1, :tsvector, generated_always_as: [to_tsvector: [:simple, :content]]
end
end
end
Error:
Hanami::Model::Error: missing attributes in ROM::Relation::Name(segments) schema: :ts_content1
How can I debug this?
Hi all. I am wondering if anyone has done/is doing application-level encryption à la Active Record Encryption https://guides.rubyonrails.org/active_record_encryption.html
I am looking to add most of the feature set of AR Encryption to our application.
Hi!
I'm having Content Security Policy problems with the Hanami 2 template project. Anyone here that could give a hint on what's wrong? :)
I'm trying to getting started with Hanami. We're hopefully going to use it in a new client project soon so we thought we should have a go and see if we can get it up and running.
I'm using a quite recent version of the Hanami 2 template https://github.com/hanami/hanami-2-application-template. I have a slightly different tool set than the one suggested in the readme. So I'm starting the project with the following:
./bin/install hello_hanami
yarn
yarn run start
# in another shell
bundle exec guard --no-notify --no-interactions
The asset server is up and running at localhost:8080. The application server is also up at port 3000 and displays correct content, but it doesn't load any assets. I get errors regarding the Content Security Policy:
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at http://localhost:8080/assets/main/public.css (“default-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at http://localhost:8080/assets/main/public.js (“default-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at http://localhost:3000/favicon.ico (“default-src”).
I'm having some issues trying to utilize a params
block in an Action within hanami-2-application-template
. If I include the block, I receive an error: NoMethodError: undefined method 'params' for Main::Actions::Characters::New:Class
... digging into the code a bit, it appears that Hanami::Action:Validatable
, which includes the params(klass = nil, &blk)
definition, is only included in Hanami::Action::StandaloneAction
(which itself is included in Haname::Action
) if Validatable
is already defined: https://github.com/hanami/controller/blob/v2.0.0.alpha6/lib/hanami/action/standalone_action.rb#L55
...it seems to me I just need to add the correct gem to my Gemfile, or require the right library file (hanami/action/validatable
?) in the right source file, or something simple like that.
Any help?
I have a question about the Hanami.application
global. After digging through the code and testing it seems like this way of keeping a global reference to the app means that you can have only one Hanami instance running at once? So if I wanted to run two Hanami apps mounted at different paths in Sinatra, could I?
I'm not asking because I have that particular use case, but I am trying to solve some of the same problems that Hanami have solved and this is the final thing I'm stuck on. It might not be a problem for Hanami - normally you would just run a single instance anyway. But I'm building a REST API abstraction library and this global reference (if I understand it correctly) means that end users would not be able to have two API libraries based on my abstraction loaded at the same time - they would both try to use the global and get into a conflict, the same way you would if you tried to load two Hanami apps at once now.
Or am I missing something? :slight_smile:
new
command like I did with the rest of the options: hanami new pistachio --test=rspec --database=postgres --template=erb
UpdateUser.new.call(user)
. With this approach you can also unit-test the domain without mocking the db.
rich domain model means that the models contain the logic
Not in a functional way, you have your data and the module logic is the "owner" of this data.
That is how the rich domain is represented in functional.
Hanami allows us to design our code, takes all the advantages you can.
That's a big step comparatively of Rails that forces us in a MVC + RailswayTM
Failed to load resource: the server responded with a status of 404 (Not Found)
for a lot of assets. However, looking in the public\assets
folder the different app folders have those assets that are reported missing.