elixir-web / weber

[WiP] Web framework for Elixir inspired by Rails [#WeberMVC at freenode]
http://elixir-web.github.io/weber/
MIT License
370 stars 33 forks source link

Add rendering of different action and/or controller #199

Closed rcdilorenzo closed 10 years ago

rcdilorenzo commented 10 years ago

Here's the example usage:

defmodule TestTestTest.Redirect do
  use Weber.Controller

  layout false

  def render_other_action([], _conn) do
    {:render_other_action, :action1, [binding: "original value"]}
  end

  def render_other_controller([], _conn) do
    {:render_other_controller, :TestTestTest.Main, :action1, [binding: "original value"]}
  end

  def action1([binding: value], _conn) do
    {:text, value, []}
  end

end