timriley on elide-slice-name-in-lib
Use configured paths for extra … Tweak comment (compare)
timriley on elide-slice-name-in-lib
Elide slice name from lib/ when… Detect component dirs inside sl… (compare)
timriley on unstable
timriley on main
Port configuration to dry-confi… (compare)
depfu[bot] on update
I am a user of Hanami router, but I never used 'resources' or thing like that, always to direct action routing.
I would like to try it but it doesn't find my action, how can I tell hanami router to find the class inside the correct namespace ?
namespace 'admin' do resources 'applications', only: %i[index] end get '/admin/applications', to: Controllers::Admin::Applications::Index
Name Method Path Action admin_applications GET, HEAD /admin/applications Applications::Index GET, HEAD /admin/applications Application::Controllers::Admin::Applications::Index
@memoht I'd strongly suggest to go with > 2.0-alpha releases. The framework had been almost entirely rewritten, and some basic concepts had been changed.
It's much, much easier to use now, but as it's still alpha, there are some things not finished yet, such as view helpers not being accessible. I already work with Hanami 2.0 early releases to identify such troublesome parts, and I'm working on official guides, as with video tutorials to make it easier to start.
Definitely if you'll work with 1.3 Hanami release, then you'll need to re-do a lot of the work soon.
:warning: A word from the unofficial shameless commerce division: Given the partial meltdown in Rails-world and Hanami 2 going alpha2, now may be a good time to promote and sponsor Hanami in some way e.g. Tim Riley, Piotr Solnica, Luca Guidi or Sebastian Wilgosz (hanamimastery).
@svoop thanks, I especially appreciate that you decided to give a support to HanamiMatery now, in this early stage, where it's hardest to keep pushing with the content!
rerun -- sidekiq -c path/to/configor similar.
Also, a question concerning Hanami 2.0.
My colleague and I are currently developing/maintaning a couple of Rails applications and have little production experience otherwise. Being heavily burned by both our earlier incompetence but also later by Rails, we are considering using Hanami 1.3 for our next commercial application product. Since Hanami 2.0 is on the horizon, we're wondering if there is any information available about how painful it would be to migrate 1.3 -> 2.0 when it's released.
You're not alone, at least :) We'll launch with 1.3 as we're closing in on the 1.0 with our app and will migrate later.
Answering my own previous question about partials/layouts in hanami/mailer: we ended up hacking together hanami/view instance with hanami/mailer to get all those sweet view helpers, partials and layouts in our mailers.
New question: what is the preferred way of sharing configuration code between two web applications?
For example, I have apps/auth/application.rb and apps/admin/application.rb and I want them to share content security policy, some included helpers for views/actions and staging/production host configuration. I've found in this chat's history discussion about sharing config via inheritance (ie Auth::Application and Admin::Application extend Web::Application where shared configuration is defined), but as I understood this approach could cause problems.
Does anyone know how specify controller to nested route?
resources :organizations, only:  do member do get 'me', to: 'sessions#me' end end
$ hanami routes Name Method Path Action me_organization GET, HEAD /organizations/:id/me Web::Controllers::Organizations::Sessions::Me
$ hanami routes Name Method Path Action me_organization GET, HEAD /organizations/:id/me Web::Controllers::Organizations::Me
controller: option instead of
to:, but I got same ouput.