- Diff en AccountsController
- EntriesController
- Account#entries_with_balance (método del modelo)
- Template del account/show (listado) y entries/new
- Entries Helper (algunos métodos)
- www.wyeworks.com
- @jmbejar
- Accounts controller
- Vistas:
- new
- _modal y _modal_content
- _form
- currencies_options helper
- Vistas con respuesta js desde el servidor:
- create.js.erb
- update.js.erb
- error.js.erb
Results of running self.class.ancestors
in different types of controllers.
Please note the position of ActionView::Rendering
with respect to the rendering modules that are present in all cases (ActionController::Renderers::All
, ActionController::Renderers
and ActionController::Rendering
)
1- Controller inheriting from ActionController::Base
[
...
ActionController::Renderers::All,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Debe implementarse una clase cuyo nombre es HomeCoach o AwayCoach, dependiendo de si es el equipo azul o el rojo. | |
class HomeCoach { | |
// Es obligatorio definir el método "name" retornando un string | |
name() { | |
return 'Uruguay'; | |
} | |
// Es oabligatorio definir el método "players" retornando un array con 10 objetos que tiene un "type" y un "name" | |
// Uno debe ser de tipo captain, 3 de tipo fast y 6 de tipo averare. Si no son esas cantidades exactas, el juego dará error. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SubscriptorsController < ActionController::Metal | |
ActionController::Base.without_modules(:Flash, :Cookies).each do |left| | |
p left | |
include left | |
end | |
include Rails.application.routes.url_helpers | |
# Define some internal variables that should not be propagated to the view. | |
PROTECTED_IVARS = AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES + [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/liquid_renderable.rb b/lib/liquid_renderable.rb | |
index 0f66188..117e765 100644 | |
--- a/lib/liquid_renderable.rb | |
+++ b/lib/liquid_renderable.rb | |
@@ -2,7 +2,7 @@ module LiquidRenderable | |
CLONE_TITLE_REGEXP = %r{(\d+)$} | |
- def render_liquid!(controller, channel, edit, draft = false) | |
+ def render_liquid!(controller, channel, edit, draft = false, locals = {}) |
NewerOlder