Re: rails 2.3 AS render_component and flash madness

2009-05-21 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 21 de Mayo de 2009 00:22:38 Ed W escribió:
 Sergio Cambra .:: entreCables S.L. ::. wrote:
  I want to remove render_component for nested scaffolds, but I don't
  think I have time in some weeks. I think it's hard implement embbeded
  scaffolds without render_component.
 
 
  The way I thought to reimplement nested scaffolds it's using nested
  resources in the routes, but it only would work for one association,
  not nested links for many associations.

 I wanted to help on this, but I don't quite understand this part of the
 problem

 Can you give me a brief explanation of why there is a problem with
 routes and some of the subtleties?


I was thinking in use routes as /users/1/roles, /users/1/roles/new, 
/users/1/roles/1, /users/1/roles/1/edit and so on for a nested scaffold. I want 
to use list method to get the list, adding a condition, instead of nested 
method rendering components for each association, so it wouldn't work for 
nested links as add_link 'Name', [:assoc1, :assoc2]. params[:eid] and storing 
constraints in session shouldn't be needed with that changes.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
ActiveScaffold : Ruby on Rails plugin group.
To post to this group, send email to activescaffold@googlegroups.com
To unsubscribe from this group, send email to 
activescaffold+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~--~~~~--~~--~--~---



Re: rails 2.3 AS render_component and flash madness

2009-05-21 Thread Ed W
Sergio Cambra .:: entreCables S.L. ::. wrote:
  Can you give me a brief explanation of why there is a problem with
  routes and some of the subtleties?
 


 I was thinking in use routes as /users/1/roles, /users/1/roles/new, 
 /users/1/roles/1, /users/1/roles/1/edit and so on for a nested 
 scaffold. I want to use list method to get the list, adding a 
 condition, instead of nested method rendering components for each 
 association, so it wouldn't work for nested links as add_link 'Name', 
 [:assoc1, :assoc2]. params[:eid] and storing constraints in session 
 shouldn't be needed with that changes.


So essentially it boils down to

- If we want to render for the final user view we want to render with a 
custom template
- But sometimes we want to render the same action and get a raw version 
with the default template

Can't this be done using some trickery with the render function?

Perhaps the final output view should simply render a partial.  That way 
we could render the partial on it's own when we want to use it in a 
nested association and the html template for final output?  User can 
still customise the partial if necessary and we add only a minimal 
overhead to the rendering?

Seems like this would work ok?

Ed W

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
ActiveScaffold : Ruby on Rails plugin group.
To post to this group, send email to activescaffold@googlegroups.com
To unsubscribe from this group, send email to 
activescaffold+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~--~~~~--~~--~--~---



Re: rails 2.3 AS render_component and flash madness

2009-05-21 Thread Kenny Ortmann
- If we want to render for the final user view we want to render with a
custom template
- But sometimes we want to render the same action and get a raw version with
the default template

This really already happens.  if the list action was of format js it
responds with layout = false, if it is of type html it response with layout
true.
The final user view is the html version which renders with template and the
js version renders with a raw view

The nested actions just render the regular actions, but there are some
things that happen in the nested partial that add constraints and what not.
That logic shouldn't be in the view anyways, so once that logic is moved to
the controller actions then nested scaffolds don't need to use render
anymore.

On Thu, May 21, 2009 at 11:25 AM, Ed W li...@wildgooses.com wrote:

  Sergio Cambra .:: entreCables S.L. ::. wrote:

  Can you give me a brief explanation of why there is a problem with
  routes and some of the subtleties?
 


  I was thinking in use routes as /users/1/roles, /users/1/roles/new,
 /users/1/roles/1, /users/1/roles/1/edit and so on for a nested scaffold. I
 want to use list method to get the list, adding a condition, instead of
 nested method rendering components for each association, so it wouldn't work
 for nested links as add_link 'Name', [:assoc1, :assoc2]. params[:eid] and
 storing constraints in session shouldn't be needed with that changes.



 So essentially it boils down to

 - If we want to render for the final user view we want to render with a
 custom template
 - But sometimes we want to render the same action and get a raw version
 with the default template

 Can't this be done using some trickery with the render function?

 Perhaps the final output view should simply render a partial.  That way we
 could render the partial on it's own when we want to use it in a nested
 association and the html template for final output?  User can still
 customise the partial if necessary and we add only a minimal overhead to the
 rendering?

 Seems like this would work ok?

 Ed W

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
ActiveScaffold : Ruby on Rails plugin group.
To post to this group, send email to activescaffold@googlegroups.com
To unsubscribe from this group, send email to 
activescaffold+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~--~~~~--~~--~--~---



Re: rails 2.3 AS render_component and flash madness

2009-05-20 Thread Sergio Cambra .:: entreCables S.L. ::.
On Miércoles, 20 de Mayo de 2009 01:27:08 Tim Uckun escribió:
 When I upgraded to rails 2.3 I could no longer use embedded scaffolds.
 After much googling I followed the advice on the mailing lists and
 installed the render_component plugin from lacklac using

 script/plugin install --force
 git://github.com/lackac/render_component.git-r rails-edge

 Unfortunately that broke flash and none of my flash messages worked
 anymore.


 After looking at the forks from that I installed

 script/plugin install --force git://
 github.com/robrasmussen/render_component.git

 And now my flashes are back but I don't know if anything else is broken.

 This is a pretty sorry state of affairs. I am using somebodies fork of
 somebodies fork of the official plug in  in order to get active scaffold to
 work because AS uses a call that has been deprecated for a long time and
 now finally removed from the framework altogether.

 I am posting this here in the hopes that it saves somebody else the hours
 of digging I had to go through.

 Is AS ever going to remove the dependency on render_component? I certainly
 don't envision a future where these people will maintain the plugins.

I want to remove render_component for nested scaffolds, but I don't think I 
have time in some weeks. I think it's hard implement embbeded scaffolds without 
render_component.

The way I thought to reimplement nested scaffolds it's using nested resources 
in the routes, but it only would work for one association, not nested links 
for many associations.


-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
ActiveScaffold : Ruby on Rails plugin group.
To post to this group, send email to activescaffold@googlegroups.com
To unsubscribe from this group, send email to 
activescaffold+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~--~~~~--~~--~--~---



Re: rails 2.3 AS render_component and flash madness

2009-05-20 Thread Dovadi

See 
http://github.com/lackac/render_component/commit/e851c6427d25784fd450529a446f43def159d4df
for a fix.

I asked  Lackac to look into it, but he didn't have the time for it
(yet).

Best Frank

On May 20, 8:32 am, Sergio Cambra .:: entreCables S.L. ::.
ser...@entrecables.com wrote:
 On Miércoles, 20 de Mayo de 2009 01:27:08 Tim Uckun escribió:





  When I upgraded to rails 2.3 I could no longer use embedded scaffolds.
  After much googling I followed the advice on the mailing lists and
  installed the render_component plugin from lacklac using

  script/plugin install --force
  git://github.com/lackac/render_component.git-r rails-edge

  Unfortunately that broke flash and none of my flash messages worked
  anymore.

  After looking at the forks from that I installed

  script/plugin install --force git://
  github.com/robrasmussen/render_component.git

  And now my flashes are back but I don't know if anything else is broken.

  This is a pretty sorry state of affairs. I am using somebodies fork of
  somebodies fork of the official plug in  in order to get active scaffold to
  work because AS uses a call that has been deprecated for a long time and
  now finally removed from the framework altogether.

  I am posting this here in the hopes that it saves somebody else the hours
  of digging I had to go through.

  Is AS ever going to remove the dependency on render_component? I certainly
  don't envision a future where these people will maintain the plugins.

 I want to remove render_component for nested scaffolds, but I don't think I
 have time in some weeks. I think it's hard implement embbeded scaffolds 
 without
 render_component.

 The way I thought to reimplement nested scaffolds it's using nested resources
 in the routes, but it only would work for one association, not nested links
 for many associations.

 --
 Sergio Cambra .:: entreCables S.L. ::.
 Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
 T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
ActiveScaffold : Ruby on Rails plugin group.
To post to this group, send email to activescaffold@googlegroups.com
To unsubscribe from this group, send email to 
activescaffold+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~--~~~~--~~--~--~---



Re: rails 2.3 AS render_component and flash madness

2009-05-20 Thread Soren Christensen

Thanks a million Tim !

This was exactly the same issue that I was fighting.

I have several embedded scaffolds and they are working just fine with 
this new render_components under rails 2.3

/S

Tim Uckun wrote:
 When I upgraded to rails 2.3 I could no longer use embedded scaffolds. 
 After much googling I followed the advice on the mailing lists and 
 installed the render_component plugin from lacklac using

 script/plugin install --force 
 git://github.com/lackac/render_component.git 
 http://github.com/lackac/render_component.git -r rails-edge

 Unfortunately that broke flash and none of my flash messages worked 
 anymore.

 After looking at the forks from that I installed

 script/plugin install --force 
 git://github.com/robrasmussen/render_component.git 
 http://github.com/robrasmussen/render_component.git

 And now my flashes are back but I don't know if anything else is broken.

 This is a pretty sorry state of affairs. I am using somebodies fork of 
 somebodies fork of the official plug in  in order to get active 
 scaffold to work because AS uses a call that has been deprecated for a 
 long time and now finally removed from the framework altogether.

 I am posting this here in the hopes that it saves somebody else the 
 hours of digging I had to go through.

 Is AS ever going to remove the dependency on render_component? I 
 certainly don't envision a future where these people will maintain the 
 plugins.



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
ActiveScaffold : Ruby on Rails plugin group.
To post to this group, send email to activescaffold@googlegroups.com
To unsubscribe from this group, send email to 
activescaffold+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~--~~~~--~~--~--~---



Re: rails 2.3 AS render_component and flash madness

2009-05-20 Thread Tim Uckun
On Wed, May 20, 2009 at 11:31 AM, Kenny Ortmann kenny.ortm...@gmail.comwrote:

 Thank you for the second version down there.  Our flash message have also
 been boofed, but we thought it was a problem with rails.  Are your embedded
 scaffolds still working with the second fork?


Yes they seem to be working OK.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
ActiveScaffold : Ruby on Rails plugin group.
To post to this group, send email to activescaffold@googlegroups.com
To unsubscribe from this group, send email to 
activescaffold+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~--~~~~--~~--~--~---



Re: rails 2.3 AS render_component and flash madness

2009-05-20 Thread Tim Uckun
On Wed, May 20, 2009 at 11:16 PM, Dovadi frank.oxe...@gmail.com wrote:


 See
 http://github.com/lackac/render_component/commit/e851c6427d25784fd450529a446f43def159d4df
 for a fix.

 I asked  Lackac to look into it, but he didn't have the time for it
 (yet).



I don't blame him. I don't think too many people are using this plugin and
as time goes on less and less people will use it.

Having said that I don't understand why these changes are not merged back
into the official plugin written by DHH and advertised on the rails web
site.

This is one of the most annoying things about rails moving to git and
github. Now every search for a gem shows five to ten forks and you have no
idea why those forks exist, if they are being maintained, what problems they
attempt to solve and why nobody has merged their changes to the original
gem.

For example gem search actionwebservice shows

actionwebservice (1.2.6)
datanoise-actionwebservice (2.3.2)
davidsmalley-actionwebservice (2.3.1)
dougbarth-actionwebservice (2.1.1)
GavinJoyce-actionwebservice (2.2.3)
nmeans-actionwebservice (2.1.1)


Sorry but that's just lame.   The primary reason for this crappy state of
affairs is people who are unwilling to maintain their gems.  Given the
frustration people just fork away and code their changes or bugfixes. As a
result one branch has one feature, the other branch has one one fix, the
other branch is just old.

Sorry to rant but it really annoys the crap out of me.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
ActiveScaffold : Ruby on Rails plugin group.
To post to this group, send email to activescaffold@googlegroups.com
To unsubscribe from this group, send email to 
activescaffold+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~--~~~~--~~--~--~---



Re: rails 2.3 AS render_component and flash madness

2009-05-19 Thread Kenny Ortmann
Thank you for the second version down there.  Our flash message have also
been boofed, but we thought it was a problem with rails.  Are your embedded
scaffolds still working with the second fork?

On Tue, May 19, 2009 at 6:27 PM, Tim Uckun timuc...@gmail.com wrote:

 When I upgraded to rails 2.3 I could no longer use embedded scaffolds.
 After much googling I followed the advice on the mailing lists and installed
 the render_component plugin from lacklac using

 script/plugin install --force git://github.com/lackac/render_component.git-r 
 rails-edge

 Unfortunately that broke flash and none of my flash messages worked
 anymore.

 After looking at the forks from that I installed

 script/plugin install --force git://
 github.com/robrasmussen/render_component.git

 And now my flashes are back but I don't know if anything else is broken.

 This is a pretty sorry state of affairs. I am using somebodies fork of
 somebodies fork of the official plug in  in order to get active scaffold to
 work because AS uses a call that has been deprecated for a long time and now
 finally removed from the framework altogether.

 I am posting this here in the hopes that it saves somebody else the hours
 of digging I had to go through.

 Is AS ever going to remove the dependency on render_component? I certainly
 don't envision a future where these people will maintain the plugins.



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
ActiveScaffold : Ruby on Rails plugin group.
To post to this group, send email to activescaffold@googlegroups.com
To unsubscribe from this group, send email to 
activescaffold+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~--~~~~--~~--~--~---