Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Builders #21

Open
wants to merge 4 commits into from

3 participants

@chikamichi

Saw that on IRC. Builders support for Apotomo, with a larger pending refactoring I guess.

chikamichi added some commits
@chikamichi chikamichi support for Cells builders feature
This comes redundant with Cells internals, but this is due to what may
be a flaw in current Apotomo's design, which bypass Cells workflow
(#render_cell_for) and hook directly into AbstractController::Rendering.

Using Cells' #create_cell_for proved cumbersome due to the different
naming conventions, so here's the most direct patch I found atm.
dba14fe
@chikamichi chikamichi support for Cells builders feature
This comes redundant with Cells internals, but this is due to what may
be a flaw in current Apotomo's design, which bypass Cells workflow
(#render_cell_for) and hook directly into AbstractController::Rendering.

Using Cells' #create_cell_for proved cumbersome due to the different
naming conventions, so here's the most direct patch I found atm.
7340f28
@chikamichi chikamichi Merge branch 'builders' of github.com:chikamichi/apotomo into builders 8631a8d
@chikamichi chikamichi Merge remote-tracking branch 'upstream/master' into builders d87896b
@kuraga

@apotonick @chikamichi Don't you what there were on IRC? :-D It's seems to be down now... And what does this code do? Thanks for attention.

@chikamichi

Honestly I didn't understand your question :)

@kuraga

@chikamichi You wrote: 'Saw that on IRC'. But I can't open IRC channel.
What does this code do?

@apotonick
Owner

This code adds cells' builder functionality (https://github.com/apotonick/cells/blob/master/README.rdoc#builders) to apotomo. I had a conceptual issue with that and forgot to work on it.

@chikamichi

Honestly I don't remember much about this too. It's been 2 years.

@kuraga

So :+1: to merge :) Are tests and docs necessary?

@apotonick
Owner
@kuraga kuraga referenced this pull request from a commit in kristianmandrup/apotomo
@kristianmandrup kristianmandrup add essential cells documentation to apotomo README 5e8abdc
@kuraga

@apotonick haven't you remember now? :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 20, 2011
  1. @chikamichi

    support for Cells builders feature

    chikamichi authored
    This comes redundant with Cells internals, but this is due to what may
    be a flaw in current Apotomo's design, which bypass Cells workflow
    (#render_cell_for) and hook directly into AbstractController::Rendering.
    
    Using Cells' #create_cell_for proved cumbersome due to the different
    naming conventions, so here's the most direct patch I found atm.
Commits on Mar 25, 2011
  1. @chikamichi

    support for Cells builders feature

    chikamichi authored
    This comes redundant with Cells internals, but this is due to what may
    be a flaw in current Apotomo's design, which bypass Cells workflow
    (#render_cell_for) and hook directly into AbstractController::Rendering.
    
    Using Cells' #create_cell_for proved cumbersome due to the different
    naming conventions, so here's the most direct patch I found atm.
  2. @chikamichi
Commits on Aug 1, 2011
  1. @chikamichi
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/apotomo/widget.rb
View
5 lib/apotomo/widget.rb
@@ -168,6 +168,11 @@ def render_widget(widget_id, state=:display, *args)
else
widget = find_widget(widget_id) or raise "Couldn't render non-existent widget `#{widget_id}`"
end
+
+ target_class = self.class.build_class_for(parent_controller, widget.class, args.first)
+ if widget.class != target_class
+ widget = target_class.new(parent_controller, widget_id, args.first)
+ end
widget.invoke(state, *args)
end
Something went wrong with that request. Please try again.