Sha256: c3041713089cb3b308ed0851b795ee81686c0ecb325fc7685a150e69bad3f5c2
Contents?: true
Size: 313 Bytes
Versions: 2
Compression:
Stored size: 313 Bytes
Contents
class TodosController::New < BaseAction def default_view_data super.merge({todo: todo}) end def perform return view_builder.build(Home::ShowRedirect) unless current_user view_builder.build(Todos::NewView) end private def todo @todo ||= Todo.new(user_id: current_user.id) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aldous-1.1.3 | examples/basic_todo/app/controller_actions/todos_controller/new.rb |
aldous-1.1.2 | examples/basic_todo/app/controller_actions/todos_controller/new.rb |