-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gem migration and docs incomplete #8
Comments
Hi Rick, we're in the process of finalizing the API, and then you will get new docs! |
Thanks @apotonick, very much appreciated and liking Trailblazer 👍 In the meantime I have this controller: class ArticlesController < ApplicationController
include Trailblazer::Endpoint::Controller
def show
endpoint Article::Operation::Show.(:id => params[:id]) do |m|
m.success do |result|
render :html => cell(
Article::Cell::Show,
result["model"],
:layout => App::Cell::Layout
)
end
end
end
end I'm getting Any ideas? Not sure if I'm the bug so thought I'd mention here and raise separately if need be. |
Uhm, it looks like you're using a very old version, I can give you a working version later tonight. |
@apotonick no probs. I'll pop it on Gitter in meantime, client's breathing down my neck 🙄 |
Not sure this will help, since that gem hasn't been released, yet, and underwent many changes and redesigns. |
@apotonick cool, I'll put in a workaround for now until you get a chance. |
Yeah, just run the op manually in the controller and add some |
class ArticlesController < ApplicationController
def show
result = Article::Operation::Show.(:id => params[:id])
if result.success?
render :html => cell(
Article::Cell::Show,
result["model"],
:layout => App::Cell::Layout
)
elsif result["model"].nil?
render(
:html => cell(
App::Cell::Error,
nil,
:layout => App::Cell::Layout
),
:status => 404
)
end
end
end I'm a TB noob, can you tell 😄 |
So there's one thing you could take advantage of already, that's Other than that, what you do here is basically what your endpoint will abstract in a few hrs. 😜 |
Hello! Is there an ETA for the gem's release? |
Good timing, there's an |
Excellent! I'm looking forward to it. |
The endpoint code has been moved from Trailblazer to here but it looks like process wasn't completed because the only way I can seem to use the gem is bundling directly from Github.
Docs also need updating.
The text was updated successfully, but these errors were encountered: