Re: association sorting

2011-11-18 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 18 de Noviembre de 2011 16:05:08 Hernan Astudillo escribió:
 Hi All,
 
 Many times i've been requested to sort options for select in a different
 way than default, since not allways a==b works as we would want (like
 numbers).
 Yeah, you could say: use options_for_association or some other override.
 However that's kinda ugly when you're using chaining forms and other
 features.
 
 It would be nice to have a :sort option so you could pass :sql or a block,
 and by default leave the a==b to preserve backwards compatibility
 
 tweaking the method that does the job looks easy, however the option setter
 and passing don't know what you have to do there.
 
 shall i do it myself and send a pull request? i'm kinda new with that
 pulling-pushing thing on github so any help would be appreciated

Add some methods in column to set the sort order. Look at associated_limit for 
example:

# to set how many associated records a column with plural association must 
show in list
cattr_accessor :associated_limit
@@associated_limit = 3
attr_accessor :associated_limit

.
   def initialize(...)
  ...
  @associated_limit = self.class.associated_limit
  ...
   end

To pass the option add a third parameter, and change method calls to pass the 
option

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Thank you for all the hard work on AS!

2011-11-17 Thread Sergio Cambra .:: entreCables S.L. ::.
On Miércoles, 16 de Noviembre de 2011 19:53:39 Hernan Astudillo escribió:
 yeah, about that... to add/fix/update/help on wiki, is just edit and save?
 or you have to authorize the user first, or mail it... don't know how
 github's security works in this aspect.

Only edit and save, there is no security but changes can be reverted

 
 cheers,
 
 On Wed, Nov 16, 2011 at 1:56 PM, Sergio Cambra .:: entreCables S.L. ::. 
 
 ser...@entrecables.com wrote:
  On Miércoles, 16 de Noviembre de 2011 17:30:14 anithri escribió:
   ActiveScaffold is a integral part of my rails projects at work.  Your
  
  work
  
   has made it easy for me to rapidly add new functionality and made it
   possible to customize things to my heart's content.
   
   So I just wanted to stop by and say Thank You!
  
  It's good to read it
  
  Any help is welcome, documenting, adding tests, fixing bugs. Really help
  in those aspects would be great
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: how to integrate ck editor to active scaffold in rails 3

2011-11-17 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 17 de Noviembre de 2011 14:27:22 faizal escribió:
 gem 'rails', '3.0.9'
 
 gem 'active_scaffold_vho', '3.0.20'
 gem 'active_scaffold_config_list_vho', '3.0.2'
 gem 'active_scaffold_batch_vho','3.0.6'
 gem 'active_scaffold_export_vho','3.0.1'
 gem 'active_scaffold_sortable_vho','3.0.1'
 gem 'recordselect_vho','3.0.3'
 gem 'render_component_vho','3.0.3'
 
 i am using above mentioned gems
 how can i use ck editor for all textarea in active scaffold
 
 Thanks,

I have never used ck editor, I don't know how to convert a textarea in a ck 
editor.
If you need some custom html, or add javascript for each textarea, you can 
build a form_ui for ck editor, to build the textarea.
def active_scaffod_input_ck_editor(column, options)
...
end

And use it with form_ui = :ck_editor


-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: problem with nested scaffold

2011-11-16 Thread Sergio Cambra .:: entreCables S.L. ::.
On Miércoles, 16 de Noviembre de 2011 13:09:16 faizal escribió:
 in my controller
 
 class RolesController  ApplicationController
 active_scaffold :role do |config|
 config.nested.add_link(user, :users)
 end
 end
 
 class UsersController  ApplicationController
 active_scaffold :user do |config|
 end
 end
 
 i my model
 
 class Role  ActiveRecord::Base
 has_many :user
 end
 
 class User  ActiveRecord::Base
 belongs_to :role
 end
 
 for the above lines of code it fails to generate nested scaffold

Role should have many users, instead of user. Try that

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Thank you for all the hard work on AS!

2011-11-16 Thread Sergio Cambra .:: entreCables S.L. ::.
On Miércoles, 16 de Noviembre de 2011 17:30:14 anithri escribió:
 ActiveScaffold is a integral part of my rails projects at work.  Your work
 has made it easy for me to rapidly add new functionality and made it
 possible to customize things to my heart's content.
 
 So I just wanted to stop by and say Thank You!

It's good to read it

Any help is welcome, documenting, adding tests, fixing bugs. Really help in 
those aspects would be great

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: problem with nested scaffold

2011-11-16 Thread Sergio Cambra .:: entreCables S.L. ::.
I thik it's config.nested.add_link :users, at least in latest version

On Miércoles, 16 de Noviembre de 2011 14:26:36 faizal escribió:
 tried that but not working
 
 On Nov 16, 6:01 pm, Sergio Cambra .:: entreCables S.L. ::.
 
 ser...@entrecables.com wrote:
  On Miércoles, 16 de Noviembre de 2011 13:09:16 faizal escribió:
   in my controller
   
   class RolesController  ApplicationController
   active_scaffold :role do |config|
   config.nested.add_link(user, :users)
   end
   end
   
   class UsersController  ApplicationController
   active_scaffold :user do |config|
   end
   end
   
   i my model
   
   class Role  ActiveRecord::Base
   has_many :user
   end
   
   class User  ActiveRecord::Base
   belongs_to :role
   end
   
   for the above lines of code it fails to generate nested scaffold
  
  Role should have many users, instead of user. Try that
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 50.018 Zaragoza
  T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: refresh contents of active scaffold

2011-11-15 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 15 de Noviembre de 2011 05:40:59 faizal escribió:
 Hello,
 
 it works but the index page open as a seperate view but what i need
 was to refresh the already existing view

Try adding :position = nil
Maybe it's needed :inline = true, although it should be default value

 
 Thanks
 
 On Nov 14, 6:27 pm, Sergio Cambra .:: entreCables S.L. ::.
 
 ser...@entrecables.com wrote:
  On Lunes, 14 de Noviembre de 2011 14:19:02 faizal escribió:
   hello,
I want to add a custom action link to my activescaffold table view on
   clicking on this link user should be allowed to refresh the contents
   of the active scaffold table
   
   Thanks
  
  conf.action_links.add :index, :label = '', :type = :collection
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 50.018 Zaragoza
  T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: add_subgroup label...how to i18n it?

2011-11-15 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 15 de Noviembre de 2011 09:39:25 Atastor escribió:
 I of course want :communication_stuff translated :-)

Have you tried to put it under :active_scaffold key?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: multiple embedded active scaffolds

2011-11-15 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 15 de Noviembre de 2011 09:32:45 Atastor escribió:
 Read again, the relevant text passage under Wikis Embedded Scaffold is
 now:
 
 Restrictions on embedding scaffolds
 
  You can put the same scaffold more than once on a page, but the
  constraints or conditions must be different so DOM IDs for the two
  scaffolds are different.
 
 Sergio just recently changed the doc, not sure how old the respective code
 changes were (just picked it up reading here).

I'm not sure when it was changed to work so I didn't add anything about 
versions

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: subgrouping forms, another question

2011-11-15 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 15 de Noviembre de 2011 09:38:32 Atastor escribió:
 Do I really have to configure two different sets of subgroups for create
 and update, each? Or is there a way to DRY this up?
 

Yes, but you can use a loop:

[:create, :update].each do |action| 
  conf.send(action).columns.add_subgroup ...
end

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Conditioned subforms

2011-11-15 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 14 de Noviembre de 2011 16:08:45 jeprato escribió:
 Hello, Is there a way to show a subform depending of a previous
 selection on the main form?
 for examaple, i have this models:
 
 class ModelA
   has_one :model_b
   has_one :model_c
 end
 
 class ModelB
   belongs_to :model_a
 end
 
 class ModelC
   belongs_to :model_a
 end
 
 I want to show only one subform for model B or model C after the user
 makes a choice in form for model A

You will have to set update_columns and add some custom javascript to 
render_field.js.erb

controller:
conf.columns[:model].update_columns = [:model_b, :model_c]

render_field.js.erb:
%= render :super %
code to hide/show model_b and model_c

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Bug: Record Select with Update Columns

2011-11-14 Thread Sergio Cambra .:: entreCables S.L. ::.
On Domingo, 13 de Noviembre de 2011 16:15:26 JB escribió:
 I'm getting the following JS error in an alert box:
 
   TypeError: this.options.onchange.call is not a function
 
 My column is configured with the following:
 
   conf.columns[:sub_contractor].form_ui = :record_select
   conf.columns[:sub_contractor].update_columns = :cost_code
 
   def after_render_field(record, column)
 if column.name == :sub_contractor
   record.cost_code_id = record.sub_contractor.cost_code_id
 end
   end
 
 If I dismiss the alert, the record_select part seems to work and the
 record updates properly. Only the cost_code column is NOT updated. If
 I use form_ui = :select, then everything works fine. I have other
 record_select columns that don't attempt to update another column that
 work fine so I'm thinking that this might be a bug in the
 update_column code.
 
 Any ideas?

Which versions of ActiveScaffold and RecordSelect are you using?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: security question on overwriting beginning_of_chain

2011-11-14 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 11 de Noviembre de 2011 19:10:06 Slava Mikerin escribió:
 Thanks for answer, I will add the missing else super, but the main
 concern is still there. What is going to prevent someone calling
 url?scope=delete_all from messing up my database.

I answered you below. I copy it here:

 My question is security related. What would prevent some one to pass
 param=delete_all and mess up my database and how can I protect against
 this.

 Change the scope test and use this:
 super.class.scopes.keys.include? scope


Test existing scope instead of calling the scope and testing whether it's a 
Relation

 
 
 On Fri, Nov 11, 2011 at 2:16 AM, Sergio Cambra .:: entreCables S.L.
 
 ::. ser...@entrecables.com wrote:
  On Viernes, 11 de Noviembre de 2011 01:56:27 slava escribió:
  Hello,
  I want to be able to pass scope param into my embedded scaffold and
  wrote this method and put it the controller (should it go into
  helper?)
  
  def beginning_of_chain
  scope = params[:scope] ? params[:scope].to_sym : nil
  if scope and super.send(scope).class == ActiveRecord::Relation
super.send scope
  end
end
  
  You should add
  else
  super
  
  Or it won't work with params[:scope] is nil
  
  My question is security related. What would prevent some one to pass
  param=delete_all and mess up my database and how can I protect against
  this.
  
  Change the scope test and use this:
  super.class.scopes.keys.include? scope
  
  thank you.
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Live update of column values during editing

2011-11-14 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 14 de Noviembre de 2011 12:11:03 Ole Rummel escribió:
 Hi,
 
 is it possible to have a live update of a column value depending on
 and during the editing of another column value?
 
 Lets say I have a model Cart and two columns :products
 and :total_price. Now I click on Edit and start adding products to my
 cart - what I want here is the concurrent update of the :total_price
 while adding the products.
 
 Do I need to build something like that myself with a form override or
 is there a way using activescaffold?
 
 Thanks in advance,
 
 Ole

You must enable update_columns and override render_field.js.erb view. I can 
give you more tips if you explain your form in more detail, is products a 
select form_ui or a subform?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: rendering after inplace editing

2011-11-14 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 14 de Noviembre de 2011 12:56:23 Ole Rummel escribió:
  How is you override? How do you apply the background color? You could set
  background color with css, using a class applied to td, and you can
  override column_class helper method to set another class if you need it,
  probably it's easier.
 
 Hi,
 thanks again for this quick answer. I use a colorpicker to select the
 color from the string in that particular cell.
 Looks like this:
 
 def color_column(record)
   color_string = record.color || '-'
 
 raw -EOT
 div style=background-color:#{record.color}; text-align:center;
 id=disabled_colorpickerHolder#{color_string}/div
 EOT
 end

You are right, you have to use a override for that. I revised inplace_edit 
feature and changed update_column view to use overrides and list_ui, removing 
some duplicated and old code. You can use :git instead of latest gem, or wait 
some days to new version

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Live update of column values during editing

2011-11-14 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 14 de Noviembre de 2011 12:49:55 Ole Rummel escribió:
 Hi,
 thanks for the quick answer. The above is just an example to get the
 idea of live updating.
 
 What I have is a model Status with a column :summary and the following
 overrides
 
 
 def summary_form_column(record, options)
text_area :record, :summary,  options.merge(:size =
 80x40, :value = record.summary || record.default_summary)
 end
 
 def summary_to_html__form_column(record)
   record.summary_to_html
 end
 
 
 Currently I see the last version of my :summary rendered as html. What
 I want is live rendering of the html during editing of the text_area.
 So I need to somehow get the summary_to_html_form dynamic.
 

This is simpler than your example of products and total, because there is no 
associations involved. You only need to set update_columns for summary column:
conf.columns[:summary].update_columns = :summary_to_html

It will be updated in change event (when focus is lost). However, there was a 
bug and update_columns it wasn't working for textareas, it will be fixed in 
next version. Also, you can enable live updating on keyup event for summary 
column addind this javascript code:

  $('text_area.summary-column.update_form').live('keyup', function(event) {
var element = $(this), value = element.val();
ActiveScaffold.update_column(element, element.attr('data-update_url'), 
element.attr('data-update_send_form'), element.attr('id'), value);
return true;
  });


Maybe you will have to improve that code with timeouts so you don't do too 
many requests, but it's up to you.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: refresh contents of active scaffold

2011-11-14 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 14 de Noviembre de 2011 14:19:02 faizal escribió:
 hello,
  I want to add a custom action link to my activescaffold table view on
 clicking on this link user should be allowed to refresh the contents
 of the active scaffold table
 
 Thanks

conf.action_links.add :index, :label = '', :type = :collection

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Help with Custom Association Options

2011-11-14 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 14 de Noviembre de 2011 15:50:00 JB escribió:
 I'm looking at the Custom Association Options
 (options_for_association_conditions helper method). I have a class
 that has a belongs_to association I want to limit the results for a
 drop down list based on the parent class. What other attributes are
 available on the passed in association? From the example I see that I
 can check association.name, but is there something like
 association.parent where I can do something like
 association.parent.other_attribute?

association is a reflection object, the association definition, not an instance 
record. You can use @record variable

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Bug: Record Select with Update Columns

2011-11-14 Thread Sergio Cambra .:: entreCables S.L. ::.
It was broken in 3.1.5, I have releasing new versions with fixes, and more 
unobtrusive javascript.

On Lunes, 14 de Noviembre de 2011 14:35:18 JB escribió:
 I have this in my Gemfile:
 
 gem 'active_scaffold', :git = 'git://github.com/activescaffold/
 active_scaffold.git'
 gem 'recordselect'
 
 bundle list shows:
 
 recordselect (3.1.5)
 active_scaffold (3.1.8 036f29a)
 
 
 
 On Nov 14, 3:52 am, Sergio Cambra .:: entreCables S.L. ::.
 
 ser...@entrecables.com wrote:
  On Domingo, 13 de Noviembre de 2011 16:15:26 JB escribió:
   I'm getting the following JS error in an alert box:
   
 TypeError: this.options.onchange.call is not a function
   
   My column is configured with the following:
   
 conf.columns[:sub_contractor].form_ui = :record_select
 conf.columns[:sub_contractor].update_columns = :cost_code
   
 def after_render_field(record, column)
   if column.name == :sub_contractor
 record.cost_code_id = record.sub_contractor.cost_code_id
   end
 end
   
   If I dismiss the alert, the record_select part seems to work and the
   record updates properly. Only the cost_code column is NOT updated. If
   I use form_ui = :select, then everything works fine. I have other
   record_select columns that don't attempt to update another column that
   work fine so I'm thinking that this might be a bug in the
   update_column code.
   
   Any ideas?
  
  Which versions of ActiveScaffold and RecordSelect are you using?
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 50.018 Zaragoza
  T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: AS and rails 3.1 - is ajax not used or i missed something?

2011-11-11 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 10 de Noviembre de 2011 21:09:10 pavel.polyakov escribió:
 hello,
 
 i just created sample project with AS using rails 3.1 / ruby 1.9.2,
 mysql as backend. I've generated AS with command rails g
 active_scaffold user, then ran rake db:migrate, ran rails s and
 finally was facing a scaffold.
 Problem is that all action links (new/show/delete/create new/ search)
 are not ajax-ified, whenever i click any of them page is reloaded
 completely and only partial related to action is returned from server.
 In other words if I click 'create new' page is reloaded and only form
 for creation of new user is shown.
 
 I've used AS with rails 2 and prototype and there all active links
 were ajaxified(as well as other actions). Is this changed for ASrails
 3.1 (which use jquery by default)?
 
 Of course i've put in layout
   %= stylesheet_link_tagactive_scaffold %
   %= javascript_include_tag active_scaffold %

You should not put that with rails 3.1, you must add active_scaffold to asset 
manifests as is explained in README and getting started:

https://github.com/activescaffold/active_scaffold/wiki/Getting-Started

 
 and also tried to create initializer active_scaffold.rb with this
 content
 ActiveScaffold.js_framework = :jquery
 

It's not needed in 3.1, it autodetects jquery-rails gem

 my routes are simple and include only generated by active_scaffold
 generator entry
   resources :users do as_routes end
 
 also, this is my Gemfile listing:
 
 source 'http://rubygems.org'
 
 gem 'rails', '3.1.0'
 gem 'sqlite3'
 
 group :assets do
   gem 'sass-rails',   ~ 3.1.0
   gem 'coffee-rails', ~ 3.1.0
   gem 'uglifier'
 end
 
 gem 'jquery-rails'
 gem 'mysql2',0.3.7
 gem 'active_scaffold', =3.1.7
 
 group :test do
   gem 'turn', :require = false
 end

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: security question on overwriting beginning_of_chain

2011-11-11 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 11 de Noviembre de 2011 01:56:27 slava escribió:
 Hello,
 I want to be able to pass scope param into my embedded scaffold and
 wrote this method and put it the controller (should it go into
 helper?)
 
 def beginning_of_chain
 scope = params[:scope] ? params[:scope].to_sym : nil
 if scope and super.send(scope).class == ActiveRecord::Relation
   super.send scope
 end
   end

You should add
else 
super

Or it won't work with params[:scope] is nil

 
 My question is security related. What would prevent some one to pass
 param=delete_all and mess up my database and how can I protect against
 this.

Change the scope test and use this:
super.class.scopes.keys.include? scope

 
 thank you.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: date, time, datetime alternatives on 3.1

2011-11-09 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 8 de Noviembre de 2011 23:56:27 Hernan Astudillo escribió:
 awesome!!
 i had to set
 conf.column[:some].form_ui = :datetime_picker
 to grab it, shouldn't it be default for timestamps?

I have tried with created_at and it's set by default
Is column type :datetime?

 
 thanks sergio
 
 On Tue, Nov 8, 2011 at 8:17 AM, Sergio Cambra .:: entreCables S.L. ::. 
 
 ser...@entrecables.com wrote:
  On Martes, 8 de Noviembre de 2011 10:28:51 Atastor escribió:
   Sorry, oversaw your question *BLUSH*
   
   Nope, picker is not shown in date time fields.
   
   RM
  
  I have added it for next version.
  You can put jquery-ui-timepicker-addon in vendor/assets/javascripts
  directory,
  and add it to your application.js below require active_scaffold line:
  
  //= require jquery-ui-timepicker-addon
  
  Download it from here:
  
  http://trentrichardson.com/examples/timepicker/js/jquery-ui-timepicker-ad
  don.js
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: date, time, datetime alternatives on 3.1

2011-11-08 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 8 de Noviembre de 2011 10:28:51 Atastor escribió:
 Sorry, oversaw your question *BLUSH*
 
 Nope, picker is not shown in date time fields.
 
 RM

I have added it for next version.
You can put jquery-ui-timepicker-addon in vendor/assets/javascripts directory,
and add it to your application.js below require active_scaffold line:

//= require jquery-ui-timepicker-addon

Download it from here:
http://trentrichardson.com/examples/timepicker/js/jquery-ui-timepicker-addon.js

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: multi select in field search

2011-11-07 Thread Sergio Cambra .:: entreCables S.L. ::.
You can do it with field_search too

On Sábado, 5 de Noviembre de 2011 08:47:17 slava escribió:
 found answer for this one.
 it is :
 columns[:currency].search_ui = :multi_select
 
 On Oct 31, 12:48 pm, slava mikerin.sl...@gmail.com wrote:
  Hello,
  Trying to create a useful search mechanism for my scaffold I need to
  be able to select multiple choices in a select for a search field.
  
  I am using latest active scaffold with rails 3.1 app and
  AdvancedFieldSearch
  pluginhttp://code.google.com/p/activescaffold-ext/wiki/AdvancedFieldSear
  ch
  
  Is there a way to define a multiselect?
  
  columns[:currency].search_ui = :multi-select ??
  
  thanks

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Calculations on Virtual Columns

2011-10-21 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 20 de Octubre de 2011 18:27:38 SOREN CHRISTENSEN escribió:
 Hi,
 
 The helper method name seems to be off - likely something related to how I
 ported the code to the 2.3 environment, or a difference between Rails2 and
 Rails3.
 The override_formatter is in render_column_calculations set to:
 render_amount_#Proc:0x00010e969380@/.._controller.rb:39
 
 Is there some setup of the Proc that happens elsewhere that I have missed ?
 Do you have an example of the Proc doing formatting as well ?

You are right, render_#{column.name}_#{column.calculate} doesn't work with a 
proc, you can try with this:
render_#{column.name}_#{column.calculate.is_a?(Proc) ? :calculate : 
column.calculate}

 
 /S
 
 
 
 On 10/20/11 12:27 AM, Sergio Cambra .:: entreCables S.L. ::.
 
 ser...@entrecables.com wrote:
 On Miércoles, 19 de Octubre de 2011 21:04:45 SOREN CHRISTENSEN escribió:
  Excellent.
  
  Forgot to say that I'm in 2.3 but back ported the proc ability to
  AS2.3/2.4.
  
  How to you override the formatting for the calculation, or is the proc
  supposed to return everything ?
 
 You should define render_quantity_sold_sum method to formatting the
 calculation
 Or you can format it in the proc
 
  /S
  
  On 10/19/11 5:20 AM, Sergio Cambra .:: entreCables S.L. ::.
  
  ser...@entrecables.com wrote:
  On Martes, 18 de Octubre de 2011 00:57:23 SOREN CHRISTENSEN escribió:
   Hi,
   
   Has anyone put in the effort to get the standard ActiveScaffold
   calculations work on Virtual Coulmns?
   
   Quantity_sold is a virtual column defined in the model (as opposed to
  
  being
  
   a database column). But AS does not support calculations for those.
   
   config.columns[:quantity_sold].calculate = :sum
   
   Is this doable with reasonable effort ?
   
   /S
  
  You must set a proc, for example:
  
  config.columns[:quantity_sold].calculate = proc{|records|
  records.map(:quantity_sold).sum}

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Autocomplete?

2011-10-21 Thread Sergio Cambra .:: entreCables S.L. ::.
. For more options, visit
   this group athttp://groups.google.com/group/activescaffold?hl=en.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Calculations on Virtual Columns

2011-10-20 Thread Sergio Cambra .:: entreCables S.L. ::.
On Miércoles, 19 de Octubre de 2011 21:04:45 SOREN CHRISTENSEN escribió:
 Excellent.
 
 Forgot to say that I'm in 2.3 but back ported the proc ability to
 AS2.3/2.4.
 
 How to you override the formatting for the calculation, or is the proc
 supposed to return everything ?
 

You should define render_quantity_sold_sum method to formatting the calculation
Or you can format it in the proc

 /S
 
 On 10/19/11 5:20 AM, Sergio Cambra .:: entreCables S.L. ::.
 
 ser...@entrecables.com wrote:
 On Martes, 18 de Octubre de 2011 00:57:23 SOREN CHRISTENSEN escribió:
  Hi,
  
  Has anyone put in the effort to get the standard ActiveScaffold
  calculations work on Virtual Coulmns?
  
  Quantity_sold is a virtual column defined in the model (as opposed to
 
 being
 
  a database column). But AS does not support calculations for those.
  
  config.columns[:quantity_sold].calculate = :sum
  
  Is this doable with reasonable effort ?
  
  /S
 
 You must set a proc, for example:
 
 config.columns[:quantity_sold].calculate = proc{|records|
 records.map(:quantity_sold).sum}

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Calculations on Virtual Columns

2011-10-19 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 18 de Octubre de 2011 00:57:23 SOREN CHRISTENSEN escribió:
 Hi,
 
 Has anyone put in the effort to get the standard ActiveScaffold
 calculations work on Virtual Coulmns?
 
 Quantity_sold is a virtual column defined in the model (as opposed to being
 a database column). But AS does not support calculations for those.
 
 config.columns[:quantity_sold].calculate = :sum
 
 Is this doable with reasonable effort ?
 
 /S

You must set a proc, for example:

config.columns[:quantity_sold].calculate = proc{|records| 
records.map(:quantity_sold).sum}

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Fileupload = AS Partial failing with incompatible character encodings: ASCII-8BIT and UTF-8

2011-10-19 Thread Sergio Cambra .:: entreCables S.L. ::.
On Miércoles, 5 de Octubre de 2011 14:06:39 guillaume escribió:
 Hello,
 
 While doing a file upload with a file containing non ASCII Characters, the
 upload is going fine, but AS fail on loading the final partial.
 After that if i reload the page everything works fine.
 
 Here is the error message :
 
 Completed 500 Internal Server Error in 1146ms
 
 ActionView::Template::Error (incompatible character encodings: ASCII-8BIT
 and UTF-8):
 9:
 10: tr class=record %= tr_class % id=%= element_row_id(:action
 =
 
 :list, :id = record.id) % data-refresh=%= url_for(params_for(:action
 := row, :id = record.id, :_method = :get, :escape = false)).html_safe
 :%
 
 data-as_load=tr
 11:   %= render :partial = 'list_record_columns', :locals = {:record
 = record, :columns = columns} %
 12:   %= render :partial = 'list_actions', :locals = {:record =
 record, :url_options = url_options, :action_links = action_links} unless
 action_links.empty? %
 13:   %= render_nested_view(action_links, url_options, record) unless
 @nested_auto_open.nil? %
 14: /tr
   activesupport (3.0.9)
 lib/active_support/core_ext/string/output_safety.rb:82:in `concat'
   activesupport (3.0.9)
 lib/active_support/core_ext/string/output_safety.rb:82:in `concat'
   actionpack (3.0.9) lib/action_view/template/handlers/erb.rb:14:in `'
   /Users/guillaume/.rvm/gems/ruby-1.9.2-p290/bundler/g
 
 BTW i did put every UTF8 stuff in my app (default_encoding, external,
 internal etc..), seems to really be just an AS bug in that case.
 
 Thanks for helping.

Please, disable backtrace silencers and send a full backtrace

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Custom Clone Action

2011-10-19 Thread Sergio Cambra .:: entreCables S.L. ::.
I used it with index action, but I add some parameters to each action link. I 
have checked the code and you cannot have multiple action links to the same 
action and same parameters. It would be better to define a clone action:

#routes
resources :orders do
  as_routes
  get :clone, :on = :member
end

#controller
def clone
  @record = find_if_allowed(params[:id], :read)
  @record = @record.clone
  respond_to_action(:new)
end

On Miércoles, 19 de Octubre de 2011 17:12:54 JB escribió:
 Nope. That doesn't work either. For now I just overrode the
 _list_header.html.erb partial in my view.
 
 On Oct 18, 2:36 am, Sergio Cambra .:: entreCables S.L. ::.
 
 ser...@entrecables.com wrote:
  On Sábado, 8 de Octubre de 2011 21:38:06 JB escribió:
   I've created a custom action link to clone records using this in my
   controller:
   
 active_scaffold :order do |conf|
   conf.action_links.add 'new', :label = 'Clone', :type = :member
 end
   
   I've also overriden the do_new controller method like this:
   
 def do_new
   @params_id = params[:id]
   if @params_id.present?
 @record = Order.find(@params_id)
 @record.clone
   else
 @record = Order.create
   end
 end
   
   Everything works great except that the original Create New link at the
   top of the form is gone. Any ideas on how I can get it back?
  
  Try setting another name to action link, like clone:
  conf.action_links.add 'clone', :action = 'new', :label = 'Clone',
  :type = :member
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 50.018 Zaragoza
  T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Refreshing scaffold via ajax

2011-10-18 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 11 de Octubre de 2011 22:30:14 dave smylie escribió:
 I need to update the contents of  scaffold without reloading the entire
 page.
 
 I can create an action link easily enough to add the action link required:
 
   config.action_links.add('refresh', :label = 'Refresh', :inline = true,
 
 :position = false)
 
 But I'm not sure how to re-render the scaffold.
 
 I believe the partial I need to render is the 'list' partial, but this
 requires the @page and @records instance variables be populated.
 I'm sure how I should be populating these?
 
 Alternatively, is there another, easier way to refresh a scaffold?
 
 Cheers
 Dave Smylie

Try adding :action = 'index' and it will refresh it

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Possible to stop persistence in search and pagination?

2011-10-18 Thread Sergio Cambra .:: entreCables S.L. ::.
On Miércoles, 12 de Octubre de 2011 02:34:01 cpg escribió:
 Hello,
 
 Today one of our users would like to have the persistence of searches
 and pagination removed.
 
 I have not noticed anything about this in the docs before.
 
 From a search, I see how to reset the search when closing (in
 7fe86aaa183a40d41c40c8f09b16393cbd0b20d2) but not too sure if there is
 a setting for turning off search automatically after a new refresh.
 
 Is this possible in AS at the moment?
 
 Thanks,

I forgot pagination, but I think it isn't persisted in the session.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Custom Clone Action

2011-10-18 Thread Sergio Cambra .:: entreCables S.L. ::.
On Sábado, 8 de Octubre de 2011 21:38:06 JB escribió:
 I've created a custom action link to clone records using this in my
 controller:
 
   active_scaffold :order do |conf|
 conf.action_links.add 'new', :label = 'Clone', :type = :member
   end
 
 I've also overriden the do_new controller method like this:
 
   def do_new
 @params_id = params[:id]
 if @params_id.present?
   @record = Order.find(@params_id)
   @record.clone
 else
   @record = Order.create
 end
   end
 
 Everything works great except that the original Create New link at the
 top of the form is gone. Any ideas on how I can get it back?

Try setting another name to action link, like clone:
conf.action_links.add 'clone', :action = 'new', :label = 'Clone', :type 
= :member

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Bug with nested.add_link and has_one association

2011-10-18 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 13 de Octubre de 2011 17:28:40 Differenthink escribió:
 Lets hope sergio find us a nice patch :)

I was on holidays. 

Could you put a sample application in github? Or send it to me?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: date, time, datetime alternatives on 3.1

2011-10-18 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 13 de Octubre de 2011 10:44:34 Atastor escribió:
 Well..without any further configuration the date classed attributes just
 work in one of my current 3.1 projects:
 
 https://lh4.googleusercontent.com/-upSmxoNu4lM/TpaktFVhuRI/AX4/y0c
 5ip_aDdo/Bildschirmfoto%2525202011-10-13%252520um%25252010.42.10.png
 
 datetime is NOT working.
 
 Regards
 Michael

date picker works in 3.1 (with jquery)
Unobtrusived date picker is for prototype, I haven't used prototype with rails 
3.x, but I can help someone trying to fix it.

Which is not working for datetime? Is picker displayed?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: 3.1 precompile assets

2011-10-18 Thread Sergio Cambra .:: entreCables S.L. ::.
Probably it's a bug in rails 3.1.0
Workaround is enabling compile in production mode:
config.assets.compile = true

On Lunes, 17 de Octubre de 2011 18:45:54 Hernan Astudillo escribió:
 Hi,
 
 I'm trying to get an app into production which requires precompiling
 the assets, however:
 
 rake assets:precompile --trace
 ** Invoke assets:precompile (first_time)
 ** Execute assets:precompile
 rake aborted!
 gears.png isn't precompiled
   (in
 /home/nano/.bundler/ruby/1.8/active_scaffold-801719cc0723/app/assets/style
 sheets/active_scaffold.css.erb)
 
 Tasks: TOP = assets:precompile
 (See full trace by running task with --trace)
 
 
 css declarations looks fine (asset_path) and images are there.
 
 in Gemfile:
  group :assets do
 gem 'sass-rails',   ~ 3.1.0
 gem 'sass'
 gem 'coffee-rails', ~ 3.1.0
 gem 'uglifier'
  end
 
 and application.rb:
 
 Bundler.require *Rails.groups(:assets = %w(development test))
 
 config.assets.enabled = true
 config.assets.version = '1.0'
  config.generators do |g|
 g.template_engine :haml
 g.stylesheet_engine :sass
  end

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Bug with nested.add_link and has_one association

2011-10-07 Thread Sergio Cambra .:: entreCables S.L. ::.
I have never used nested.add_link with singular associations, and I'm not sure 
it was supported anytime, but it's working now (with git master, it's not 
released yet)

On Jueves, 6 de Octubre de 2011 15:12:07 Differenthink escribió:
 Hello,
 
 In my process migration to Rails 3 i've found a bug in AS on has_one
 conditions and nested.add_link.
 I've two models,
 
 class Abonnement
  belongs_to :desabonnement
 
 class Desabonnement
   has_one :abonnement
 
 if i set something like : config.nested.add_link(:abonnement, {:label =
 Voir Abonnement associé})
 i've got a nice error : AbstractController::ActionNotFound (The action
 'none' could not be found for Www::Admin::AbonnementController):
 
 If y change my has_one to has_many then it works.
 
 Regards.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Bug with nested.add_link and has_one association

2011-10-07 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 7 de Octubre de 2011 11:22:19 Differenthink escribió:
 Well it worked great for me with an old rails 2.3 version...
 Do you have any release date ? and also will it be merge into 3.0 branch or
 only 3.1 ?
 
 thanx.

I will release it today, I'm waiting in case of I find another bug.

I have backported it to rails 3.0, but it's not tested.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Fileupload = AS Partial failing with incompatible character encodings: ASCII-8BIT and UTF-8

2011-10-05 Thread Sergio Cambra .:: entreCables S.L. ::.
On Miércoles, 5 de Octubre de 2011 14:06:39 guillaume escribió:
 Hello,
 
 While doing a file upload with a file containing non ASCII Characters, the
 upload is going fine, but AS fail on loading the final partial.
 After that if i reload the page everything works fine.

What are you using for file upload? 

 
 Here is the error message :
 
 Completed 500 Internal Server Error in 1146ms
 
 ActionView::Template::Error (incompatible character encodings: ASCII-8BIT
 and UTF-8):
 9:
 10: tr class=record %= tr_class % id=%= element_row_id(:action
 =
 
 :list, :id = record.id) % data-refresh=%= url_for(params_for(:action
 := row, :id = record.id, :_method = :get, :escape = false)).html_safe
 :%
 
 data-as_load=tr
 11:   %= render :partial = 'list_record_columns', :locals = {:record
 = record, :columns = columns} %
 12:   %= render :partial = 'list_actions', :locals = {:record =
 record, :url_options = url_options, :action_links = action_links} unless
 action_links.empty? %
 13:   %= render_nested_view(action_links, url_options, record) unless
 @nested_auto_open.nil? %
 14: /tr
   activesupport (3.0.9)
 lib/active_support/core_ext/string/output_safety.rb:82:in `concat'
   activesupport (3.0.9)
 lib/active_support/core_ext/string/output_safety.rb:82:in `concat'
   actionpack (3.0.9) lib/action_view/template/handlers/erb.rb:14:in `'
   /Users/guillaume/.rvm/gems/ruby-1.9.2-p290/bundler/g
 
 BTW i did put every UTF8 stuff in my app (default_encoding, external,
 internal etc..), seems to really be just an AS bug in that case.
 
 Thanks for helping.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Reverse Association woes

2011-10-03 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 30 de Septiembre de 2011 18:18:14 Ryan Moats escribió:
 I've been using the 3.1.2 gem from github.
 
 Looking at line 73/74 of lib/active_scaffold/attibute_params.rb via the
 github code browser, I don't see anything different from what is in my
 gem. So while I can see about pulling the latest commit, I doubt it's
 going to clarify anything.


There is a difference
gem:
raise ActiveScaffold::ReverseAssociationRequired, Association #{a.name}:

git:
raise ActiveScaffold::ReverseAssociationRequired, Association #{a.name} in 
class #{parent_record.class.name}:

 
 Ryan
 
 On Fri, 30 Sep 2011, Sergio Cambra .:: entreCables S.L. ::. wrote:
  On Viernes, 30 de Septiembre de 2011 16:42:26 Ryan Moats escribió:
  Final update... once I looked at the associations in Fief again it
  dawned on me that the ones I was tripping over are incomplete
  specifications and confuse AS because it can't find the other end.
  
  Correct specification for the four associations are:
has_many :lent_forces, :class_name = LentForce, :foreign_key =
  
  sourceFief_id, :inverse_of = :lending_fief
  
has_many :borrowed_forces, :class_name = LentForce, :foreign_key
  
  = holderFief_id, :inverse_of = :lessee_fief
  
has_many :prisoners, :class_name = Prisoner, :foreign_key =
  
  sourceFief_id, :inverse_of =  :owning_fief
  
has_many :held_prisoners, :class_name = Prisoner, :foreign_key =
  
  holderFief_id, :inverse_of = :holding_fief
  
  and then creating a World works.
  
  So, bottom line is that I'd like to see the error message in this case
  be a bit more useful - I spent a day on a wild goose chase based on
  what the error said instead of the 30 minutes that it took once I got
  on the right track.
  However, looking at the code that raises this error, it's not obvious
  to me how to make the statement more descriptive...
  
  Ryan
  
  On Sep 30, 8:55 am, Ryan Moats r...@canonicalblue.com wrote:
  An update on this topic.  After chasing down the inflection rathole
  for most of yesterday, I pulled back out and went back to simple A/B
  testing of Fief.  It turns out that the error message is rather
  misleading (and I guess you can count this as a grump) as the
  problem is not the association between World and Fief as is reported,
  but the issue is between Fief and a pair of classes that each have a
  pair of foreign keys back to the Fief table.
  
  What I'm bumping against is the following definitions in Fief:
has_many :lent_forces, :inverse_of =  :lending_fief
  
  #  has_many :borrowed_forces, :inverse_of = :lessee_fief
  
has_many :prisoners, :inverse_of =  :owning_fief
  
  #  has_many :held_prisoners, :inverse_of = :holding_fief
  
  the first two has many declarations match up with the following
  
  lines in LentForces:
belongs_to :lending_fief, :foreign_key =
  
  sourceFief_id, :class_name = Fief
  
belongs_to :lessee_fief, :foreign_key =
  
  holderFief_id, :class_name = Fief
  
  while the second two match up with the following lines from Prisoner:
belongs_to :owning_fief, :foreign_key =
  
  sourceFief_id, :class_name = Fief
  
belongs_to :holding_fief, :foreign_key =
  
  holderFief_id, :class_name = Fief
  
  With the lines from Fief shown commented above, I can add a new World
  via AS.  If I uncomment either of them, then I trip the error.  So,
  there is a problem, but it's not where it's reported.
  
  More as I chase this down...
  Ryan
  
  Are you using rails 3.1? Can you check with last commit if error message
  is better now?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: customizing show action

2011-10-03 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 3 de Octubre de 2011 07:00:10 slava escribió:
 Hello,
 Trying to modify how active_scaffold displays show action for a model.
 I want to display a subset of model attributes in index action but
 show more attributes in show displayed in a custom way.
 I created _show.html.erb and copied code from active_scaffold
 _show.html.erb and will work on modifications here.
 How do I tell active_scaffold to display a different set of columns in
 show from the one in index? Thanks.

config.show.columns = ...

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Reverse Association woes

2011-09-30 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 30 de Septiembre de 2011 16:42:26 Ryan Moats escribió:
 Final update... once I looked at the associations in Fief again it
 dawned on me that the ones I was tripping over are incomplete
 specifications and confuse AS because it can't find the other end.
 
 Correct specification for the four associations are:
 
   has_many :lent_forces, :class_name = LentForce, :foreign_key =
 sourceFief_id, :inverse_of = :lending_fief
   has_many :borrowed_forces, :class_name = LentForce, :foreign_key
 = holderFief_id, :inverse_of = :lessee_fief
   has_many :prisoners, :class_name = Prisoner, :foreign_key =
 sourceFief_id, :inverse_of =  :owning_fief
   has_many :held_prisoners, :class_name = Prisoner, :foreign_key =
 holderFief_id, :inverse_of = :holding_fief
 
 and then creating a World works.
 
 So, bottom line is that I'd like to see the error message in this case
 be a bit more useful - I spent a day on a wild goose chase based on
 what the error said instead of the 30 minutes that it took once I got
 on the right track.
 However, looking at the code that raises this error, it's not obvious
 to me how to make the statement more descriptive...
 
 Ryan
 
 On Sep 30, 8:55 am, Ryan Moats r...@canonicalblue.com wrote:
  An update on this topic.  After chasing down the inflection rathole
  for most of yesterday, I pulled back out and went back to simple A/B
  testing of Fief.  It turns out that the error message is rather
  misleading (and I guess you can count this as a grump) as the
  problem is not the association between World and Fief as is reported,
  but the issue is between Fief and a pair of classes that each have a
  pair of foreign keys back to the Fief table.
  
  What I'm bumping against is the following definitions in Fief:
  
has_many :lent_forces, :inverse_of =  :lending_fief
  #  has_many :borrowed_forces, :inverse_of = :lessee_fief
has_many :prisoners, :inverse_of =  :owning_fief
  #  has_many :held_prisoners, :inverse_of = :holding_fief
  
  the first two has many declarations match up with the following
  lines in LentForces:
  
belongs_to :lending_fief, :foreign_key =
  sourceFief_id, :class_name = Fief
belongs_to :lessee_fief, :foreign_key =
  holderFief_id, :class_name = Fief
  
  while the second two match up with the following lines from Prisoner:
  
belongs_to :owning_fief, :foreign_key =
  sourceFief_id, :class_name = Fief
belongs_to :holding_fief, :foreign_key =
  holderFief_id, :class_name = Fief
  
  With the lines from Fief shown commented above, I can add a new World
  via AS.  If I uncomment either of them, then I trip the error.  So,
  there is a problem, but it's not where it's reported.
  
  More as I chase this down...
  Ryan

Are you using rails 3.1? Can you check with last commit if error message is 
better now?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Nested Link issue

2011-09-29 Thread Sergio Cambra .:: entreCables S.L. ::.
Thanks by reporting. It's a bug because we are using jquery_ujs from jquery-
rails instead of the patched rails.js from rails 3. I think it's the last js 
bug due to that change.

On Jueves, 29 de Septiembre de 2011 03:35:49 blmundie escribió:
 I have an issue with nested action links in rails 3.1.  The link
 renders the results fine.  The issue i have is when closing the result
 the main table index is inserted in place of the closed results.  For
 instance if I have a scaffold for users with a nested link for posts
 when closing the posts index /users is inserted in it's place.  The
 issue is in active_scaffold / frontends / default / views /
 _list_inline_adapter.html.erb.
 
 The link for the close is created by
 %= link_to(as_(:close), '', :class = 'inline-adapter-close
 as_cancel', :remote = true, :title = as_(:close), 'data-refresh' =
 (action_name == 'index' ? true : false)) -%
 
 I'm guessing action_name is 'index' for the nested links.
 
 This issue doesn't happen with action links I create
 config.action_links.add  :type = :member, :position = :after.
 Related I've noticed that the row with the link is no longer updated
 on close.  I can submit a code fix, but I'm a little confused on what
 the desired results are.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: localizing column headers

2011-09-28 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 27 de Septiembre de 2011 12:38:40 Slava Mikerin escribió:
 active_scaffold :terms do |config|
 config.columns = [
 
 :symbol,
 
 ...
 ]
 end
 
 

Column labels have no model interpolation, there are some strings with that 
interpolation like create_model, create_another, show_model, update_model and 
others.

 
 On Tue, Sep 27, 2011 at 2:32 AM, Sergio Cambra .:: entreCables S.L.
 
 ::. ser...@entrecables.com wrote:
  On Martes, 27 de Septiembre de 2011 11:15:59 Slava Mikerin escribió:
  There is no view code. It's an active scaffold controller.
  
  Where are you using symbol in the controller?
  
  On Tue, Sep 27, 2011 at 1:22 AM, Sergio Cambra .:: entreCables S.L.
  
  ::. ser...@entrecables.com wrote:
   On Martes, 27 de Septiembre de 2011 08:49:43 slava escribió:
   Hello,
   Having a bit of a difficulty with localization.
   
   en:
 active_scaffold:
   symbol: Symbol %{model}
   
   gives me on the page
   Symbol %{model}
   
   instead of the interpolated value. What am I missing? Thanks.
   
   What is the code in the view?
   
   --
   Sergio Cambra .:: entreCables S.L. ::.
   Mariana Pineda 23, 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.
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Enable GitHub Issues for official repo

2011-09-28 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 27 de Septiembre de 2011 20:25:16 clyfe escribió:
 Please enable GitHub issues for the official repository. to
 facilitate collaboration.
 I want to propose some changes regarding subform records wiring with their
 parent that facilitate out-of-the-box CanCan bridge functionality.
 GH issues proved to be very beneficial in my collaboration with Volker.
 
 Thank you.

You can send pull requests. We had issues enabled but nobody moved issues from 
google to github, and now I have no time to do it. Anyway, probably most of 
them are invalid now, so I have reopened issues

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: localizing column headers

2011-09-28 Thread Sergio Cambra .:: entreCables S.L. ::.
On Miércoles, 28 de Septiembre de 2011 14:06:47 Slava Mikerin escribió:
 I am not sure I understand what to do.. I tried
 
  en:
active_scaffold:
   symbol: Symbol %{show_model.type}
 
 that did not work. How do I get an attribute from the model to show up
 interpolated?

It's not possible, column labels don't interpolate anything.
Usually you should add a key like activerecord.attributes.model.column, then 
you won't need any interpolation

en:
  activerecord:
attributes:
  model:
symbol: Symbol model

Also, you can set a symbol in the column, without interpolation too:
config.columns[:symbol].label = :model_symbol
en:
  active_scaffold:
symbol: Symbol model


If you want to use interpolation, you will have to override label method of 
ActiveScaffold::DataStructures::Column class

 
 On Wed, Sep 28, 2011 at 2:02 AM, Sergio Cambra .:: entreCables S.L.
 
 ::. ser...@entrecables.com wrote:
  On Martes, 27 de Septiembre de 2011 12:38:40 Slava Mikerin escribió:
  active_scaffold :terms do |config|
  config.columns = [
  
  :symbol,
  
  ...
  ]
  end
  
  Column labels have no model interpolation, there are some strings with
  that interpolation like create_model, create_another, show_model,
  update_model and others.
  
  On Tue, Sep 27, 2011 at 2:32 AM, Sergio Cambra .:: entreCables S.L.
  
  ::. ser...@entrecables.com wrote:
   On Martes, 27 de Septiembre de 2011 11:15:59 Slava Mikerin escribió:
   There is no view code. It's an active scaffold controller.
   
   Where are you using symbol in the controller?
   
   On Tue, Sep 27, 2011 at 1:22 AM, Sergio Cambra .:: entreCables S.L.
   
   ::. ser...@entrecables.com wrote:
On Martes, 27 de Septiembre de 2011 08:49:43 slava escribió:
Hello,
Having a bit of a difficulty with localization.

en:
  active_scaffold:
symbol: Symbol %{model}

gives me on the page
Symbol %{model}

instead of the interpolated value. What am I missing? Thanks.

What is the code in the view?

--
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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.
   
   --
   Sergio Cambra .:: entreCables S.L. ::.
   Mariana Pineda 23, 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.
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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 3.1 render :super error

2011-09-28 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 23 de Septiembre de 2011 22:27:05 blmundie escribió:
 Best I can tell there are two issue.  The first is
 args_for_lookup(name, prefixes, partial, keys) calls .map on prefixes
 and activescaffold is passing a single prefix as a string.  Map is not
 a documented method for String.  It works on String on my 1.8.7
 install but not 1.9+.  To fix this I changed find_all_templates in
 active scaffold to.  This sends prefix as an array and gets the string
 out from the return.  I'm not sure this is the ideal solution, but it
 works.

Thanks, I missed this one becuase I use 1.8.7, although I'm not sure why it 
worked.

 
 class LookupContext
 module ViewPaths
   def find_all_templates(name, partial = false, locals = {})
 prefixes.collect do |prefix|
   view_paths.collect do |resolver|
 temp_args = *args_for_lookup(name, [prefix], partial,
 locals )
 temp_args[1] = temp_args[1][0]
 resolver.find_all(*temp_args)
   end
 end.flatten!
   end
 end
   end
 
 The second issue I've run into is that @_view_stack is nil if I call
 render :super in the first view and not the partial.  Seems like the
 stack only gets added to from render called in the view.  Therefor I
 get an error when I call render :super in list.html.erb, but not if I
 call it in _list.html.erb.

I have fixed it. I dislike this fix because it uses a internal variable, which 
could be removed in a later version, but render :super it's really a hack too, 
so another hack more is not very important.

 
 On Sep 22, 7:25 pm, blmundie blmun...@gmail.com wrote:
  This only happens when i use render :super in list.html.erb.  Does
  anyone have an idea?
  
  On Sep 21, 6:57 pm, blmundie blmun...@gmail.com wrote:
   If i set the template to render a partial that render :super I get
   past the above error.  It then gives me a new error.  I get is
   ActionView::Template::Error (undefined method `map' for
   installations:String):
   18:   )%
   19:
   20:
   21: %= render :super %
 actionpack (3.1.0) lib/action_view/lookup_context.rb:129:in
   `normalize_name'
 actionpack (3.1.0) lib/action_view/lookup_context.rb:114:in
   `args_for_lookup'
 /home/bryan/.rvm/gems/ruby-head/bundler/gems/
   active_scaffold-5c4ae3b25238/lib/active_scaffold/extensions/
   action_view_rendering.rb:7:in `block (2 levels) in find_all_templates'
   
   installations is the name of my model.
   
   On Sep 21, 4:15 pm, blmundie blmun...@gmail.com wrote:
I'm getting an error when calling render :super in rails 3.1.

ActionView::Template::Error (You have a nil object when you didn't
expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.last):
19:
20:
21:
22: %= render :super %
  /home/bryan/.rvm/gems/ruby-head/bundler/gems/
active_scaffold-0ce03559d49f/lib/active_scaffold/extensions/
action_view_rendering.rb:42:in `render_with_active_scaffold'
  app/views/installation_alarms/list.html.erb:22:in
`_app_views_installation_alarms_list_html_erb__1059381062_93896420'

seems like activescaffold is looking for @_view_stack which is
nil.https://github.com/activescaffold/active_scaffold/blob/master/li
b/act... line 42

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: JAVA ENGINEER-CLOUD INFRASTRUCTURE-URGENT REQUIREMENT

2011-09-27 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 26 de Septiembre de 2011 18:46:25 sandy Gaj escribió:
 Hi,
 We have an urgent requirement with one of our client for JAVA/J2EE
 developers for Permanent position in SanJose,CA and Austin,Tx.Please
 forward your resume to sandy@idealforce.com
 
 With Regards,
 Sandy Gaj,
 IdealForce LLC.

This is a group about a rails plugin. Plese don't sent non-rails work offers

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: localizing column headers

2011-09-27 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 27 de Septiembre de 2011 08:49:43 slava escribió:
 Hello,
 Having a bit of a difficulty with localization.
 
 en:
   active_scaffold:
 symbol: Symbol %{model}
 
 gives me on the page
 Symbol %{model}
 
 instead of the interpolated value. What am I missing? Thanks.

What is the code in the view?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Official branch, commiters, future and a bug.

2011-09-27 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 27 de Septiembre de 2011 11:13:20 clyfe escribió:
 As you can see the input[data-remote] for click selectors is only present
 in volker's fork.

Thanks, I have changed them to links and fixed a bug.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: localizing column headers

2011-09-27 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 27 de Septiembre de 2011 11:15:59 Slava Mikerin escribió:
 There is no view code. It's an active scaffold controller.

Where are you using symbol in the controller?

 
 On Tue, Sep 27, 2011 at 1:22 AM, Sergio Cambra .:: entreCables S.L.
 
 ::. ser...@entrecables.com wrote:
  On Martes, 27 de Septiembre de 2011 08:49:43 slava escribió:
  Hello,
  Having a bit of a difficulty with localization.
  
  en:
active_scaffold:
  symbol: Symbol %{model}
  
  gives me on the page
  Symbol %{model}
  
  instead of the interpolated value. What am I missing? Thanks.
  
  What is the code in the view?
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: List Filter plugin Rails 3

2011-09-26 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 20 de Septiembre de 2011 18:22:55 Zac Zheng escribió:
  I haven't used it, but I know some people have found field_search has
  similar features. Which feature have list_filter which field_search
  doesn't have?
 
 The app I'm working on uses list filters a lot so it's unfeasible to
 change now. Although field_search does look to provide more or less
 the same stuff.
 

It's ok, I would stay with list filter too in that case. If you find a feature 
missing in field search, ask for it, I would prefer to avoid duplicate so 
similar feature.

   What would really help is having an example plugin to look at but I
   haven't found any that works with AS 3. Sortable, config_list, Export,
   none of which seem to work.
  
  Sortable works with both 3.0 and 3.1, I'm using it.
 
 Strange. I'll try again later.

Send any error you find.

 
  I have never developed neither used config_list, export and batch, but at
  least some of them should work with rails 3.0 because vhochstein have
  forks for some of them.
  
   Could the resident experts provide a few pointers on getting List
   Filter working with ActiveScaffold please?
   
   Zac
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 50.018 Zaragoza
  T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: as 3.1 form_ui not working as before

2011-09-26 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 20 de Septiembre de 2011 22:44:37 Atastor escribió:
 Given as-3.1 and class Bbb having many :aaas and class Aaa belonging to
 
 :bbb. aaa's as_config contains:
 conf.columns[:bbb].form_ui = :select
 
 When editing an aaa-record the current value of bbb is not shown, but
 -select-.

It's strange, I have used it many times, even in rails 3.1
Do you have some override?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: New Rails 3.1.0 App, Request Failed (code 500, Internal Error)

2011-09-26 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 22 de Septiembre de 2011 01:39:53 JB escribió:
 Okay, this is weird. I turned JavaScript support off and things seem
 to work. I turned it back on, and now things are working. I wonder if
 it was a caching issue with the browser? However, the response still
 doesn't contain an entry for Content-Type . . .

I got content-type text/html when it didn't work, and text/javascript now

 
 On Sep 21, 6:34 pm, JB jeff.barria...@gmail.com wrote:
  Sergio,
  
  The response headers don't contain a Content-Type. Here is what comes
  back:
  
  x-ua-compatible IE=Edge
  Etag8124375479aacc929ea2c535b17bfeb8
  Cache-Control   max-age=0, private, must-revalidate
  X-Runtime   0.198811
  Server  WEBrick/1.3.1 (Ruby/1.9.2/2010-12-25)
  DateWed, 21 Sep 2011 23:29:31 GMT
  Set-Cookie
  _myapp_session=BAh7CkkiD3Nlc3Npb25faWQGOgZFRkkiJThiZmU2N2FhZTYyYWY2NWU3Zm
  YyODljMjQ0MzgwZWU5BjsAVEkiEGFzOmNvbnRhY3RzBjsARnsGOglsaXN0ewZJIglwYWdlBjs
  ARmkGSSIWaW5wdXRfZGV2aWNlX3R5cGUGOwBGSSIKTU9VU0UGOwBGSSIUaG92ZXJfc3VwcG9y
  dGVkBjsARlRJIhBfY3NyZl90b2tlbgY7AEZJIjFkeU1uQlI1ZVZ4YzY3dXI2enQ4b1N2YUxET
  HUxKy9DSytsVGFqV0VHQjVnPQY7AEY
  %3D--2af029165a822cb3a8e89ada1971cd9714cc790b; path=/; HttpOnly
  
  On Sep 20, 4:31 am, Sergio Cambra .:: entreCables S.L. ::.
  
  ser...@entrecables.com wrote:
   On Martes, 20 de Septiembre de 2011 02:45:00 JB escribió:
Thanks Sergio, but that didn't resolve the problem. I'm still getting
the 500 error.
   
   Can you send response headers of new request? It should respond with
   right content type using git
   
On Sep 19, 2:34 am, Sergio Cambra .:: entreCables S.L. ::.

ser...@entrecables.com wrote:
 On Domingo, 18 de Septiembre de 2011 18:39:17 JB escribió:
  Steps to reproduce:
  
  Start with a fresh gemset and a fresh install of rails:
  rvm gemset create tolliver
  rvm use 1.9.2@tolliver
  gem install rails
  gem install active_scaffold
  
  Create a brand new application:
  rails new myapp
  cd myapp
  
  Add the following to Gemfile:
  gem 'active_scaffold'
  
  Run:
  bundle install
  
  Edit app/assets/javascripts/application.js
  //= require jquery
  //= require jquery_ujs
  //= require active_scaffold
  //= require_tree .
  
  Edit apps/assets/stylesheets/application.css
  /*
   *= require active_scaffold
   *= require_self
   *= require_tree .
   */
  
  Create config/initializers/active_scaffold.rb
  ActiveScaffold.js_framework = :jquery # :prototype is the
  default
 
 This step is not needed, if you have gem 'jquery-rails' and you
 don't have gem 'prototype-rails', ActiveScaffold detects it and
 setup js_framework.
 
  rails g active_scaffold Contact company:string name:string
  notes:text
  
  rake db:migrate
  
  rails server
  
  Browse to:http://localhost:3000/contacts
  
  Click the Create New button.
  
  Results in: Request Failed (code 500, Internal Error)
 
 It should be fixed in master branch. Try it, with gem
 'active_scaffold',
 
 :git = 'git://github.com/activescaffold/active_scaffold.git' When
 :all
 
 it's working I will release a new version.
 
  log/development.log shows:
  
  Started GET /contacts/new?adapter=_list_inline_adapter for
  127.0.0.1 at 2011-09-18 11:33:45 -0500
Processing by ContactsController#new as JS
Parameters: {adapter=_list_inline_adapter}
  Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
  active_scaffold-3.1.2/frontends/default/views/_form_attribute.htm
  l.erb (1.3ms)
  Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
  active_scaffold-3.1.2/frontends/default/views/_form_attribute.htm
  l.erb (0.5ms)
  Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
  active_scaffold-3.1.2/frontends/default/views/_form_attribute.htm
  l.erb (0.4ms)
  Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
  active_scaffold-3.1.2/frontends/default/views/_form.html.erb
  (16.3ms) Rendered
  /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
  active_scaffold-3.1.2/frontends/default/views/_base_form.html.er
  b (22.9ms)
  Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
  active_scaffold-3.1.2/frontends/default/views/_create_form.html.e
  rb (27.3ms)
  Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
  active_scaffold-3.1.2/frontends/default/views/_messages.html.erb
  (0.5ms)
  Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
  active_scaffold-3.1.2/frontends/default/views/
  _list_inline_adapter.html.erb (4.6ms)
  Completed 200 OK in 43ms (Views: 7.9ms | ActiveRecord: 0.0ms)
  
  So it looks

Re: Action_link that only runs a function (no view)

2011-09-26 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 22 de Septiembre de 2011 15:46:02 duker_48 escribió:
 Hey I'm looking into creating a password reset action link for a users
 list and was wondering if its possible to just have the action link
 run the reset password function and not render a new view.  I want to
 just stay on the users list page, and maybe have the a success message
 show at the top.

Set position of action link to nil, so ActiveScaffold doesn't expect request 
return a view. In the action you can use render :nothing = true, or render 
javascript code to show a successful or error message.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Tinymce

2011-09-26 Thread Sergio Cambra .:: entreCables S.L. ::.
On Sábado, 24 de Septiembre de 2011 13:33:57 Walter McGinnis escribió:
 The interface for tinymce-rails is different than the old tinymce gem. It
 is  smaller wrapper for TinyMCE and doesn't have the helper or controller
 methods such as uses_tiny_mce.
 
 You'll need to adjust things to match the new way. Check the README.

I haven't looked at tinymce plugins for rails 3.1, and I haven't updated the 
bridge. If bridge needs some changes and you can fix it, send a pull request 
please.

 
 On Sep 24, 2011, at 3:42 AM, Gloufy cedric.meusbur...@gmail.com wrote:
  Yes i try it...
  Before i can use uses_tiny_mce in my controller
  now this method is not defined...
  
  Do i try to make my own code in form_column override ?
  
  On 22 sep, 20:56, Walter McGinnis walter.mcgin...@gmail.com wrote:
  Check outhttps://github.com/spohlenz/tinymce-railsfor the TinyMCE side.
  
  On Sep 22, 2011, at 9:22 PM, Gloufy cedric.meusbur...@gmail.com wrote:
  Hello,
  
  How to use Tinymce with activescaffold and rails 3.1 ?
  
  Thanks
  
  Gloufy
  
  --
  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 athttp://groups.google.com/group/activescaffold?hl=en.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Action_link that only runs a function (no view)

2011-09-26 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 26 de Septiembre de 2011 11:34:56 Atastor escribió:
 Thanks Sergio!
 
 I used your answer, to enhance the Wiki explanation of action_links
 position-parameter, could you take a look?

It's ok, thanks for improving wiki

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: as 3.1 form_ui not working as before

2011-09-26 Thread Sergio Cambra .:: entreCables S.L. ::.
It's fixed now, thanks

On Lunes, 26 de Septiembre de 2011 12:06:07 Atastor escribió:
 Double checked, retraced the setup-steps; its really the most basic setup
 which already fails:
 
 rvm use 1.9.2@rails-3_1
 rails new select-problem
 cd select-problem
 Add active_scaffold to Gemfile (via ':git =' and to
 app/assets/*/application*
 bundle install
 rails g active_scaffold Aaa name:string bbb_id:integer
 rails g active_scaffold Bbb name:string
 bundle exec rake db:migrate
 Add has_many/belongs_to in models and conf_ui = :select to AaasController
 rails s
 
 
 add some aaas and some bbbs, and the described behavior can be
 demonstrated:
 
 https://lh6.googleusercontent.com/-7g6cHQuN8Fk/ToBOWQ00vLI/AXw/lM7
 XjPGoy6E/Bildschirmfoto%2525202011-09-26%252520um%25252012.04.42.png and
 klicking Edit:
 
 https://lh5.googleusercontent.com/-FuX3vfEsZLw/ToBOdQkXo1I/AX0/N9d
 O7UXwJb8/Bildschirmfoto%2525202011-09-26%252520um%25252012.04.48.png
 
 Regards
 Michael

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: How to run activescaffold tests (rails-3.0 branch)

2011-09-20 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 19 de Septiembre de 2011 22:17:08 Zac Zheng escribió:
 I'd like to know this too. It's inconceivable that a widely used Rails
 gem does not have a working test suite. Unless the OP and I are
 missing something?

ActiveScaffold never had a test suite, only a few tests, very few tests. 
Currently I'm the only developer, in last years there was only an active 
developer, Volker for some time I hadn't time to update for rails 3, and now 
me again, and it's hard to add a test suite because I don't have many time for 
active_scaffold. It would be great to get some pull requests to improve test 
suite.

I want to get a test suite, but I can't promise anything

 
 On Aug 31, 5:59 pm, Liehann lieha...@gmail.com wrote:
  Hi,
  
  I forked active scaffold and made a small change, and want to run the
  tests. However it fails as mock_app seems to still be a rails 2.3 app.
  
  Specifically in boot.rb there is a require 'initializer' line which
  bombs out (no initializer.rb in rails 2.x?). A rails 3.0 boot.rb looks
  quite different.
  
  So, the question is how do I make the tests run?
  
  What I tried:
  bundle install
  bundle exec raketest
  
  The output:
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/
  dependencies.rb:239:in `require': no such file to load -- initializer
  (LoadError)
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/
  active_support/dependencies.rb:239:in `require'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/
  active_support/dependencies.rb:225:in `load_dependency'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/
  active_support/dependencies.rb:596:in `new_constants_in'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/
  active_support/dependencies.rb:225:in `load_dependency'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/
  active_support/dependencies.rb:239:in `require'
  from active_scaffold/test/mock_app/config/boot.rb:55:in
  `load_initializer'
  from active_scaffold/test/mock_app/config/boot.rb:38:in `run'
  from active_scaffold/test/mock_app/config/boot.rb:11:in `boot!'
  from active_scaffold/test/mock_app/config/boot.rb:110
  
  Regards,
  Liehann

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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 3.0 bundler issue when using :git

2011-09-20 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 19 de Septiembre de 2011 20:14:05 Zac Zheng escribió:
 When adding ActiveScaffold to a Rails 3.0 app's Gemfile:
 gem 'active_scaffold', :git = https://github.com/activescaffold/
 active_scaffold.git, :branch = rails-3.0
 

Why don't you use latest 3.0.x gem?

 I encountered this mysterious error:
 ActionController::RoutingError (undefined method
 `action_after_create' for ActiveScaffold::Config::Create:Class):
 
 After a lot of hair pulling I decided to use the gem from a local
 source by:
 git clone https://github.com/activescaffold/active_scaffold.git
 git checkout -b rails-3.0 remotes/origin/rails-3.0
 
 And referring to it from the Gemfile:
 gem 'active_scaffold', :path = vendor/gems/active_scaffold
 
 The above then miraculously works. Has anyone else come across this?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: jquery datepicker in 3.1

2011-09-20 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 20 de Septiembre de 2011 07:48:48 Atastor escribió:
 Its more of a datepicking means picking a date and not a datetime kind of
 problem...
 
 And yepp, I know of Volkers
 articlehttp://vhochstein.wordpress.com/2010/09/18/activescaffold-using-da
 tes-with-jquery/about adding time picking to the date picker, I even used
 it in 3.0 projects, but I now can't figure out, how to use it in 3.1's
 asset surrounding.
 
 Any hints?
 
 Regards
 Michael

There was a javascript in rails 3.0, jquery-ui-timepicker-addon.js, which is 
missing in rails 3.1. I haven't tried it yet, and I don't know if it's working 
with rails 3.1 or it needs some updates.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: getting active_scaffold and Rails 3.1 app to work

2011-09-20 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 20 de Septiembre de 2011 11:47:12 slava escribió:
 class OrderBooksController  ApplicationController
   active_scaffold :order_book do |conf|
   end
 end

Disable backtrace silencers to get a full trace including gems

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: getting active_scaffold and Rails 3.1 app to work

2011-09-20 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 20 de Septiembre de 2011 12:29:30 slava escribió:
 I am not using any backtrace silencers on purpose..

Rails by default add some backtrace silencers so you only get info about your 
app in the backtrace. When you find a gem bug, backtrace is not useful with the 
silencers

 
 On Sep 20, 2:49 am, Sergio Cambra .:: entreCables S.L. ::.
 
 ser...@entrecables.com wrote:
  On Martes, 20 de Septiembre de 2011 11:47:12 slava escribió:
   class OrderBooksController  ApplicationController
 active_scaffold :order_book do |conf|
 end
   end
  
  Disable backtrace silencers to get a full trace including gems
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 50.018 Zaragoza
  T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: getting active_scaffold and Rails 3.1 app to work

2011-09-20 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 20 de Septiembre de 2011 12:56:23 slava escribió:
 ran rspec and see a longer backtrace for this error

Thanks, this backtrace is better.
What associations have you defined in that model?
Is there some through association?

Can you try removing them from search?
config.search.columns.exclude :through_association_name

I need that to find the problem


 
 DEPRECATION WARNING: class_inheritable_attribute is deprecated, please
 use class_attribute method instead. Notice their behavior are slightly
 different, so refer to class_attribute documentation first. (called
 from class:Form at /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/
 gems/active_scaffold-0ce03559d49f/lib/active_scaffold/config/form.rb:
 17)
 DEPRECATION WARNING: class_inheritable_attribute is deprecated, please
 use class_attribute method instead. Notice their behavior are slightly
 different, so refer to class_attribute documentation first. (called
 from class:Form at /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/
 gems/active_scaffold-0ce03559d49f/lib/active_scaffold/config/form.rb:
 17)
 /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/
 active_support/whiny_nil.rb:48:in `method_missing': undefined method
 `klass' for nil:NilClass (NoMethodError)
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/
 lib/active_record/reflection.rb:391:in `block in source_reflection'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/
 lib/active_record/reflection.rb:391:in `collect'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/
 lib/active_record/reflection.rb:391:in `source_reflection'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/
 lib/active_record/reflection.rb:538:in `derive_class_name'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/
 lib/active_record/reflection.rb:128:in `class_name'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/
 lib/active_record/reflection.rb:173:in `klass'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/data_structures/
 column.rb:367:in `initialize_search_sql'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/data_structures/
 column.rb:181:in `search_sql'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/data_structures/
 column.rb:185:in `searchable?'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/config/search.rb:
 45:in `block in columns'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/data_structures/
 columns.rb:62:in `block in each'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/data_structures/
 columns.rb:62:in `each'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/data_structures/
 columns.rb:62:in `each'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/config/search.rb:
 45:in `collect'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/config/search.rb:
 45:in `columns'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/config/core.rb:142:in
 `block in _load_action_columns'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/data_structures/
 actions.rb:20:in `block in each'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/data_structures/
 actions.rb:20:in `each'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/data_structures/
 actions.rb:20:in `each'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/config/core.rb:139:in
 `_load_action_columns'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold.rb:178:in
 `active_scaffold'
   from /home/slava/.rvm/gems/ruby-1.9.2-p290/bundler/gems/
 active_scaffold-0ce03559d49f/lib/active_scaffold/bridges/cancan/
 cancan_bridge.rb:14:in `active_scaffold_with_cancan'
   from /home/slava/dev/projects/bitcoin-derivatives/app/controllers/
 order_books_controller.rb:2:in `class:OrderBooksController'
   from /home/slava/dev/projects/bitcoin-derivatives/app/controllers/
 order_books_controller.rb:1:in `top (required)'

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) ser

Re: List Filter plugin Rails 3

2011-09-20 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 20 de Septiembre de 2011 14:33:03 Zac Zheng escribió:
 I've been trying to get the List Filter plugin working with
 ActiveScaffold Rails 3 branch(not vhochstein's fork) for a few days
 now and am not really getting anywhere.
 
 I'm running:
 - Rails 3.0.10
 - Ruby 1.9.2
 - tvongaza's List Filter, forked with a few minor changes at
 https://github.com/zaczheng/active_scaffold_list_filters.
 
 I can configure the plugin fine:
 
 config.actions.add :list_filter
 
 But the list_filter link does not in actin_links, so doesn't show in
 the collection link area. There's no doubt other issues too.

I haven't used it, but I know some people have found field_search has similar 
features. Which feature have list_filter which field_search doesn't have?

 
 What would really help is having an example plugin to look at but I
 haven't found any that works with AS 3. Sortable, config_list, Export,
 none of which seem to work.

Sortable works with both 3.0 and 3.1, I'm using it.

I have never developed neither used config_list, export and batch, but at least 
some of them should work with rails 3.0 because vhochstein have forks for some 
of them.

 
 Could the resident experts provide a few pointers on getting List
 Filter working with ActiveScaffold please?
 
 Zac

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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 3.1

2011-09-19 Thread Sergio Cambra .:: entreCables S.L. ::.
On Sábado, 17 de Septiembre de 2011 22:22:09 cpg escribió:
 Hi,
 
 Great job on the 3.1 release!
 
 I am a bit lost when it comes to embedded scaffolds. I have an app
 that is working fine in 3.0.9 and am not sure what exactly i have to
 do bring it to 3.1.

About embedded scaffolds you don't need to do anything. Without 
render_component embedded scaffolds will be loaded by AJAX and you will finish 
with same view.

 
 The AS table comes up, but things inside do not work. Search, create,
 and things like the Edit action link. They do send a request to the
 server, seemingly in JS
 
   Processing by Admin::UsersController#edit as JS
 
 But it sits there with the indicator spinning and nothing coming back
 to the UI.
 
 I removed vendor/plugins/render_component, based on the comments in
 this thread. I still have dynamic_form and verification.

Dynamic_form have never been used by ActiveScaffold, if you use it it's ok. 
Verification is not used, but it's unharmful.

 
 Basically I am a little confused on how to move this to the new asset
 pipeline.

If you are updating an old app, follow this tip:
http://blog.nodeta.com/2011/06/14/rails-3-1-asset-pipeline-in-the-real-world/

uglifier is not needed

For example, in app/assets/stylesheets/application.css put
/*
 *= require active_scaffold
 *= require_self
*/
your styles


If you have some background images, you should use application.css.erb and use 
image_path or image_url:
/*
 *= require active_scaffold
 *= require_self
*/
your styles {
  background-image: url(%= image_path 'image.png' %);
  background-image: %= image_url 'image.png' %;
}

You can divide your styles in multiple files and require them in 
application.css

For javascript, use this:
//= require jquery
//= require jquery_ujs
//= require active_scaffold
//= require_self

Your javascript code here


And in your layout include only application.css and application.js:

%= stylesheet_link_tag 'application' %
%= javascript_include_tag 'application' %

 
 I am using the gem (active_scaffold-3.1.2).

I think JS is working in master branch, I will release it when someone confirms 
it or when I have more time to test it.

 
 Keep up the great work and remember that we have an IRC channel now
 for sharing tips about ActiveScaffold. #active-scaffold in freenode.
 
 Thanks in advance!
 
 Carlos
 
 On Sep 16, 1:22 am, Sergio Cambra .:: entreCables S.L. ::.
 
 ser...@entrecables.com wrote:
  On Viernes, 16 de Septiembre de 2011 00:42:15 Nick Rogers escribió:
   Great news!
   
   Is this still the way to render embedded scaffolds, except without the
   render_component plugin? Or is there another way?
   
   %= render :active_scaffold = 'teams' %
  
  Yes, that's the way. It works without render_component, like in 3.0
  version. It will work with render_component, if render_component works
  with rails 3.1, I haven't tried it.
  
   Thanks!
   
   On Thu, Sep 15, 2011 at 6:35 AM, Sergio Cambra .:: entreCables S.L. ::.
   
   
   ser...@entrecables.com wrote:
3.1.0 version supporting rails 3.1 has been released:
   http://activescaffold.com/2011/9/15/rails-3-1-support
   
I haven't tested render_component in rails 3.1 so loading embedded
scaffolds by
AJAX is the default and recommended way now.

I think all features are working, but I haven't tested it
intensively. I will
be testing it with an application I'm developing now with
active_scaffold

--
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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.
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 50.018 Zaragoza
  T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: New Rails 3.1.0 App, Request Failed (code 500, Internal Error)

2011-09-19 Thread Sergio Cambra .:: entreCables S.L. ::.
On Domingo, 18 de Septiembre de 2011 18:39:17 JB escribió:
 Steps to reproduce:
 
 Start with a fresh gemset and a fresh install of rails:
 rvm gemset create tolliver
 rvm use 1.9.2@tolliver
 gem install rails
 gem install active_scaffold
 
 Create a brand new application:
 rails new myapp
 cd myapp
 
 Add the following to Gemfile:
 gem 'active_scaffold'
 
 Run:
 bundle install
 
 Edit app/assets/javascripts/application.js
 //= require jquery
 //= require jquery_ujs
 //= require active_scaffold
 //= require_tree .
 
 Edit apps/assets/stylesheets/application.css
 /*
  *= require active_scaffold
  *= require_self
  *= require_tree .
  */
 
 Create config/initializers/active_scaffold.rb
 ActiveScaffold.js_framework = :jquery # :prototype is the default

This step is not needed, if you have gem 'jquery-rails' and you don't have gem 
'prototype-rails', ActiveScaffold detects it and setup js_framework.

 
 rails g active_scaffold Contact company:string name:string notes:text
 
 rake db:migrate
 
 rails server
 
 Browse to: http://localhost:3000/contacts
 
 Click the Create New button.
 
 Results in: Request Failed (code 500, Internal Error)

It should be fixed in master branch. Try it, with gem 'active_scaffold', :git 
= 
'git://github.com/activescaffold/active_scaffold.git' When all it's working I 
will release a new version.

 
 log/development.log shows:
 
 Started GET /contacts/new?adapter=_list_inline_adapter for 127.0.0.1
 at 2011-09-18 11:33:45 -0500
   Processing by ContactsController#new as JS
   Parameters: {adapter=_list_inline_adapter}
 Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
 active_scaffold-3.1.2/frontends/default/views/_form_attribute.html.erb
 (1.3ms)
 Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
 active_scaffold-3.1.2/frontends/default/views/_form_attribute.html.erb
 (0.5ms)
 Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
 active_scaffold-3.1.2/frontends/default/views/_form_attribute.html.erb
 (0.4ms)
 Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
 active_scaffold-3.1.2/frontends/default/views/_form.html.erb (16.3ms)
 Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
 active_scaffold-3.1.2/frontends/default/views/_base_form.html.erb
 (22.9ms)
 Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
 active_scaffold-3.1.2/frontends/default/views/_create_form.html.erb
 (27.3ms)
 Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
 active_scaffold-3.1.2/frontends/default/views/_messages.html.erb
 (0.5ms)
 Rendered /Users/jeff/.rvm/gems/ruby-1.9.2-p136@tolliver/gems/
 active_scaffold-3.1.2/frontends/default/views/
 _list_inline_adapter.html.erb (4.6ms)
 Completed 200 OK in 43ms (Views: 7.9ms | ActiveRecord: 0.0ms)
 
 So it looks like everything is rendered okay. I don't see any errors
 and I have no idea what I did wrong. Any suggestions?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: getting active_scaffold and Rails 3.1 app to work

2011-09-19 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 19 de Septiembre de 2011 14:11:48 slava escribió:
 Hello,
 Trying to get the latest active scaffold from git master installed in
 my Rails 3.1 app.
 I added gem
   gem 'active_scaffold', :git = 'git://github.com/activescaffold/
 active_scaffold.git'
 
 added require active_scaffold to both javascript and stylesheet
 manifests, generated an active scaffold and opened the page. I see
 this error:
 
 uninitialized constant
 ActiveScaffold::Bridges::Cancan::ActiveRecord::Base
 
 Any Ideas? thanks.

It was a bug in cancan bridge. It's fixed now
Thanks

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: jquery datepicker in 3.1

2011-09-19 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 19 de Septiembre de 2011 16:42:35 Atastor escribió:
 Thats jquery of course, not query

Gem version? or gem from git? Also, post your javascript manifest
It's working here.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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 3.1

2011-09-16 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 16 de Septiembre de 2011 00:42:15 Nick Rogers escribió:
 Great news!
 
 Is this still the way to render embedded scaffolds, except without the
 render_component plugin? Or is there another way?
 
 %= render :active_scaffold = 'teams' %
 

Yes, that's the way. It works without render_component, like in 3.0 version. 
It will work with render_component, if render_component works with rails 3.1, 
I haven't tried it.

 
 Thanks!
 
 On Thu, Sep 15, 2011 at 6:35 AM, Sergio Cambra .:: entreCables S.L. ::. 
 
 ser...@entrecables.com wrote:
  3.1.0 version supporting rails 3.1 has been released:
  http://activescaffold.com/2011/9/15/rails-3-1-support
  
  I haven't tested render_component in rails 3.1 so loading embedded
  scaffolds by
  AJAX is the default and recommended way now.
  
  I think all features are working, but I haven't tested it intensively. I
  will
  be testing it with an application I'm developing now with active_scaffold
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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 3.1

2011-09-16 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 16 de Septiembre de 2011 09:27:57 Atastor escribió:
 Fantastic (Nick stole the Great News from me :-( )!
 
 How does the Add require active_scaffold to your assets pipeline. work?
 Leaving this part out only produces not layouted pages, naively adding
 
 //= require_active_scaffold
 
 
 and
 
  *= require_active_scaffold
 
 
 in app/assets/application.js and app/assets/application.css respectively
 produces the error message
 
 couldn't find file 'active_scaffold
 
 
 I am quite sure, its me again, but I can't figure it out. Any hints?
 
 Regards
 Michael

It's working with that lines for me. Have you trying in a new app? Are you 
using it as gem or plugin?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Form helper for polymorphic has_many

2011-09-16 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 15 de Septiembre de 2011 19:10:26 Jim escribió:
 I have a parent model Design, which has many Options (polymorphic
 because other models like Job also have options).  The option name and
 value fields display on the create/edit forms, and the values can be
 saved correctly.  However, I'd like to use a helper method to display
 a select for option name, and change option_value to be a text_field
 instead of textarea.  I have done this before in a Rails 2.2.x
 project, but the naming and loading for helpers is different.
 
 I have helper overrides for the base models implemented where
 necessary, using the
 
 model_attribute_form_column

It should work with 3.0.23. You can try with attribute_form_column too.

 
 method naming.  However, I cannot come up with any working combination
 for my has_many table.  The base has_many model does not have it's own
 controller or helper files.  Should I create one anyway? If so, how
 should it be named, considering that in Design the has_many is
 specified as such:
 
 has_many :design_options, :class_name = 'JobOption', :as
 = :optionable
 
 Would I have to create a design_options controller even though a
 DesignOption model doesn't exist? If I create a job_options controller/
 helper, would the helper methods be picked up properly?  Also, note
 that I have no need for a nested options list display, merely the form
 override for the edit form.

You shouldn't need it if it's working without helper overrides

 
 Thanks in advance for any ideas.
 
 Jim

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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 3.1

2011-09-16 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 16 de Septiembre de 2011 10:33:36 Atastor escribió:
 I am using the gem and retried with new, most simple app (active_scaffolded
 1 class with 1 attribute), the error message remains.

It's strange, it was working yesterday, but now it's failing in app I was 
developing too

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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 3.1

2011-09-16 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 16 de Septiembre de 2011 11:40:39 Sergio Cambra .:: entreCables 
S.L. ::. escribió:
 On Viernes, 16 de Septiembre de 2011 10:33:36 Atastor escribió:
  I am using the gem and retried with new, most simple app
  (active_scaffolded 1 class with 1 attribute), the error message remains.
 
 It's strange, it was working yesterday, but now it's failing in app I was
 developing too

It was working when I used gem as path, I forgot to add assets to gem

Install 3.1.1

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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 3.1

2011-09-16 Thread Sergio Cambra .:: entreCables S.L. ::.
Try with bundle update rails active_scaffold

On Viernes, 16 de Septiembre de 2011 15:24:36 Ed Jones escribió:
 Tried upgrading my app from 3.0
 
 Got this from bundle update rails
 Bundler could not find compatible versions for gem rails:
   In Gemfile:
 active_scaffold depends on
   rails (~ 3.0.0)
 
 rails (3.1.0)
 
 gem update active_scaffold and gem update rails seemed to work fine.
 
 but running the server or rspec gives
 You have requested:
   rails = 3.1
 
 The bundle currently has rails locked at 3.0.9.
 Try running `bundle update rails`
 
 Thanks,
 ed
 
 On Sep 15, 6:35 am, Sergio Cambra .:: entreCables S.L. ::.
 
 ser...@entrecables.com wrote:
  3.1.0 version supporting rails 3.1 has been
  released:http://activescaffold.com/2011/9/15/rails-3-1-support
  
  I haven't tested render_component in rails 3.1 so loading embedded
  scaffolds by AJAX is the default and recommended way now.
  
  I think all features are working, but I haven't tested it intensively. I
  will be testing it with an application I'm developing now with
  active_scaffold
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 50.018 Zaragoza
  T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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.



rails 3.1

2011-09-15 Thread Sergio Cambra .:: entreCables S.L. ::.
3.1.0 version supporting rails 3.1 has been released:
http://activescaffold.com/2011/9/15/rails-3-1-support

I haven't tested render_component in rails 3.1 so loading embedded scaffolds by 
AJAX is the default and recommended way now.

I think all features are working, but I haven't tested it intensively. I will 
be testing it with an application I'm developing now with active_scaffold

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Need Sr. .NET Web Developer in Des Moines, IA for 12 months contract

2011-09-08 Thread Sergio Cambra .:: entreCables S.L. ::.
On Miércoles, 7 de Septiembre de 2011 20:37:06 Richard Zheng escribió:
 Can the list admin remove his email? I know no list that would tolerate
 this. If the list admin is busy, I don't mind volunteer on admin stuff.

I think admin is Lance Ivy, but I'm not sure. However, he hasn't post for a 
long time.

 
 On Wed, Sep 7, 2011 at 8:07 AM, Ed Jones ed.jo...@gmail.com wrote:
  I told this guy a week or two ago, but I doubt that matters.
  
  There's a report as spam link on the groups discussions page. Click
  early and often for this Rama dude!
  
  e
  
  On Sep 7, 2:03 pm, Alan Morehead alanmoreh...@gmail.com wrote:
   OMG. Here we go again...
   Are there any SPAM filters we can apply for these annoying emails? They
  
  have nothing to do with Ruby, RoR, or Active Scaffold
  
   - Original Message -
   
   From: Rama rama13...@gmail.com
   To: r...@kutirtech.com
   Sent: Wednesday, September 7, 2011 12:42:31 PM
   Subject: Need Sr. .NET Web Developer in Des Moines, IA for 12 months
  
  contract
  
   Hi
   
   We have an requirement for Sr. .NET Web Developer . If you are
   interested
  
  please send your responses on r...@kutirtech.com only
  
   Please go through the requirement and let me know your interest and
  
  please respond with the expected Billing Rate
  
   Title: Sr. .NET Web Developer with Production Support exp
   Location: Des Moines, IA
   Duration: 12 months
   Number of Positions: 4
   
   Skills Required
   * 4 year degree and 5+ years experience or equivalent combination of
  
  education and experience.
  
   * Must be expert in Asynchronous programming and GUI programming.
   * Acts as a lead in providing application design guidance and
  
  consultation, utilizing a thorough understanding of applicable
  technology, tools and existing designs.
  
   * Analyzes highly complex business requirements, designs and writes
  
  technical specifications to design or redesign complex computer platforms
  and applications.
  
   * Develops highly complex original code.
   * Acts as an expert technical resource for modeling, simulation and
  
  analysis efforts.
  
   * Preparation of test data, testing and debugging of programs.
   * Documentation and user guides.
   * Design, develop, and implement functionality for the Imaging Systems
  
  which support Wells Fargo Home Mortgage.
  
   * Must have skill to create detailed design documentation using UML,
  
  write application code using Microsoft Visual Studio 2008 (C#.NET),
  Oracle and SQL experience,
  
   * Extensive knowledge of unified markup language (UML) and implement
   new
  
  functionality via the Imaging Services Software Development Lifecycle
  (SDLC).
  
   * Must have excellent communication skills both written and verbal.
   
   Keywords :
   * 5 years of experience in IT with .NET/VB/Database
   * Client Development/ ASP.NET
   * Client Development/JavaScript
   * Client Server Development/AJAX
   * Client Server Development/SQL
   * Client Server Development/C# .Net
   * Client Server Development/VB .Net
   * Client Server Development/Visual Basic
   * Database Development/Oracle
   * Design Skills  Tools/UML
   
   Please respond with your updated resume and below details as soon as
  
  possible
  
   Full Legal Name :
   Contact number :
   Email_id :
   Billing Rate :
   Current Location :
   Visa Status :
   Relocation :
   Availability:
   
   Regards,
   Rama Chokkam
   Kutir Corporation
   Email : r...@kutirtech.com
   Direct: 510-870-0497
   Phone:510-402-4526 x 113
   Fax : 510-494-9699www.kutirtech.com
   SMB Cert: 8(a), DGS
   MBE Cert: NCMSDC, VMSDC, CPUC
   GSA Schedule 70
   Description: inc5000logo
   P Reduce, Reuse and Recycle. Go GREEN and p lease consider our
  
  environment before printing this email.
  
   --
   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 athttp://
  
  groups.google.com/group/activescaffold?hl=en.
  
  --
  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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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

Re: [field_]search.formats :yaml

2011-09-05 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 5 de Septiembre de 2011 10:48:35 Atastor escribió:
 Can somebody explain to me the benefits of the various search-formats?
 E.g., what effect has
 
 ...
 conf.field_search.formats  :yaml
 ...
 
 What can I do with searching, what I couldn't do without?
 
 Thanks
 Michael

yaml, xml and json formats are usually used for APIs or exporting. If you 
can't see the benefit of adding a format probably you don't need it.


-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: AS rails-3.0 record_select not working

2011-09-02 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 1 de Septiembre de 2011 23:48:07 Hernan Astudillo escribió:
 Ok, rails 3 only works with vhochstein's version for now.
 If you did that, are you sure you have your routes.rb right? like this?
 
 resources :teams do
 as_routes
 record_select_routes # ---this!
   end
 
 

That's wrong, my recordselect fork has vhochstein changes and I'm using it 
with rails 3. I usea activescaffold-3.0.22 and recordselect 3.0.3 gems.

I'm trying to help in him in the issue he open in github. It's getting a JS 
error, I think event is attached twice in that record select because I had a 
similar problem some time ago.

 cheers,
 
 On Wed, Aug 31, 2011 at 5:21 PM, andrea andrea.t...@3comitalia.it wrote:
  Yes, i have this error with AS and RS (both scambra and vhochstein
  version)
  
  On Aug 31, 9:58 pm, Hernan Astudillo naa...@gmail.com wrote:
   not sure what your problem is... vhochstein AS+RS works fine but you
  
  still
  
   want to use Sergio's RS and official AS over rails 3?
   
   
   
   
   
   
   
   On Tue, Aug 30, 2011 at 1:27 AM, andrea andrea.t...@3comitalia.it
  
  wrote:
I get routing error selecting a record in a belongs_to relation with
record select.
I have a Player wich belongs to a team and i have configured team
with record select. The form record select ui browse correctly all
Teams, but when select a Team, i get a routing error
/teams/1/select. I use AS branch rails 3.0 and this record_select
fork.
Using git://github.com/vhochstein/recordselect and
git://github.com/vhochstein/active_scaffold all works (the vho
version of AS not use a record _select helper with a bridge).
The git://github.com/activescaffold/active_scaffold.git AS version
not works with git://github.com/vhochstein/recordselect and with
git://github.com/scambra/recordselect.

Thanks for support.

--
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.
  
  --
  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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Demo broken

2011-09-01 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 1 de Septiembre de 2011 05:27:08 LarryK escribió:
 Hi,
 
 I'd like to view the demo, but
http://demo.activescaffold.com
 
 gives a redirect loop. Doesn't work in FF or Chrome.
 
 Regards,
 
 LarryK

It's a known problem but I don't have access to demo hosting, only to 
activescaffold.com admin interface. Maybe I should remove demo link.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: How to run activescaffold tests (rails-3.0 branch)

2011-09-01 Thread Sergio Cambra .:: entreCables S.L. ::.
Probably tests are not migrated to rails3. I picked up vhochstein's work for 
rails 3.0 and I haven't still tried to run tests

On Miércoles, 31 de Agosto de 2011 18:59:54 Liehann escribió:
 Hi,
 
 I forked active scaffold and made a small change, and want to run the
 tests. However it fails as mock_app seems to still be a rails 2.3 app.
 
 Specifically in boot.rb there is a require 'initializer' line which
 bombs out (no initializer.rb in rails 2.x?). A rails 3.0 boot.rb looks
 quite different.
 
 So, the question is how do I make the tests run?
 
 What I tried:
 bundle install
 bundle exec rake test
 
 The output:
 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/
 dependencies.rb:239:in `require': no such file to load -- initializer
 (LoadError)
   from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/
 active_support/dependencies.rb:239:in `require'
   from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/
 active_support/dependencies.rb:225:in `load_dependency'
   from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/
 active_support/dependencies.rb:596:in `new_constants_in'
   from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/
 active_support/dependencies.rb:225:in `load_dependency'
   from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/
 active_support/dependencies.rb:239:in `require'
   from active_scaffold/test/mock_app/config/boot.rb:55:in
 `load_initializer'
   from active_scaffold/test/mock_app/config/boot.rb:38:in `run'
   from active_scaffold/test/mock_app/config/boot.rb:11:in `boot!'
   from active_scaffold/test/mock_app/config/boot.rb:110
 
 Regards,
 Liehann

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Form UI Customization Query

2011-08-31 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 30 de Agosto de 2011 16:48:07 Liehann escribió:
 Hi,
 
 I'm making an override for a form column that essentially renders a
 checkbox list (which is then converted into a multi select lists). The
 problem is that I need both the record and the column to do this.
 
 In FormColumnHelpers the override_form_field method is passed @record,
 and the override_input method is passed the column, but neither is
 passed both.

override_form_field doesn't need column, you know the column name and you can 
get with active_scaffold_config.columns[name]. It could be passed so you cannot 
need to get it from config, but current apps will break.

override_input (form_ui methods) get the column. They should get record, 
because is not good to use @record, many active_scaffold methods should get the 
record instead of lying in getting the record through @record variable. 
However they don't get @record because first form_ui methods used methods like 
select, textarea and so on, which lied in @record by default. It should be 
changed, and it shouldn't break many apps, most apps won't add form_ui 
methods, but maybe there are some plugins which need to be updated.

 
 I ended up patching my branch of ActiveScaffold to pass both to the
 override_form_field method, but I'm falling behind the official
 releases, to this isn't going to work going forward. Any suggestions?
 
 My helper function looks like this:
 def lines_form_column(column, record, options)
 # Select all lines associated with the order, or associated with
 no order.
 lines = Line.all(:order = ['msisdn asc'], :conditions =
 ['(order_id is null or order_id = ?)', record.id ])
 associated_lines = lines.select{|l| l.order_id}.map{|l| l.id}
 lines.map!{|l| [l.to_label, l.id]}
 
 # Render the checkbox list then convert the checkboxes to multi
 select lists.
 active_scaffold_checkbox_list(column, lines, associated_lines,
 options) +
   javascript_tag(new MultiSelectLists('#{options[:id]}'))
 end

You can add this line:
colum = active_scaffold_config.columns[:lines] 
and then it will work with ActiveScaffold without your changes.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Create another XXX button not working.

2011-08-16 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 12 de Agosto de 2011 12:22:17 waseem ahmad escribió:
 On Fri, Aug 12, 2011 at 2:59 PM, Sergio Cambra .:: entreCables S.L. ::. 
 
 ser...@entrecables.com wrote:
  Which firefox version? It's working here, although I use latest
  active_scaffold
  version
 
 Firefox 3.6.18 On Ubuntu 10.04

Can you try with latest activescaffold version?


-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Create another XXX button not working.

2011-08-12 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 12 de Agosto de 2011 10:53:32 waseem ahmad escribió:
 On Fri, Aug 12, 2011 at 1:14 PM, Sergio Cambra .:: entreCables S.L. ::. 
 
 ser...@entrecables.com wrote:
  Do you get some javascript errors with firebug?
 
 No I do not.
 
 I posted this question to stackoverflow[1]. I have some more debugging
 information over there. I am writing those information over here also.
 
 1. Surprisingly if in Firebug, I change the generated input HTML to a,
 it works as expected. But to make this workaround permanent, I will have to
 change ActiveScaffold's code.
 2. For now I have changed the code of ActiveScaffold. This solves my
 problem. But the questions is still not answered.
 
 [1]:
 http://stackoverflow.com/questions/7006719/create-another-xxx-button-not-wo
 rking-in-activescaffold

Which firefox version? It's working here, although I use latest active_scaffold 
version

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: vhochstein fork: batch_update problem with form overrides

2011-08-05 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 4 de Agosto de 2011 18:58:16 Nick Rogers escribió:
 Thanks. Makes sense.
 
 How can I do this for datetime columns? In the past active_scaffold
 (official branch) under rails 2.3.X would automatically create a
 datetime_select form for datetime columns. Now it defaults to a blank
 textbox.

By default active scaffold in rails 2.3 rendered fields using input method, 
which used date_select for date selects. But in rails 3 there is no input 
method, so now active scaffold renders fields using text_field method by 
default.

 
 How can I replace this form override with something that will work with
 bulk_update?
 
   def expires_at_form_column(record, input_name)
 datetime_select(:record, :expires_at,
 
   :start_year = Time.now.year - 5, :end_year = Time.now.year + 5,
   :default = Time.now,
   :order = [:day, :month, :year])
 
   end
 
 Thanks!
 
 On Thu, Aug 4, 2011 at 2:48 AM, vhochstein vhochst...@googlemail.comwrote:
  Hi Nick,
  
  that will not work. You will have to use a batch update form override.
  
  However, even simpler would be to just set state in your config to
  form_ui select and just set your enum as well.
  https://github.com/activescaffold/active_scaffold/wiki/Enum-Columns
  
  --
  Volker
  
  On Aug 3, 11:10 pm, Nick Rogers ncrog...@gmail.com wrote:
   I'm having some trouble getting batch_update to work with my scaffold.
   Everything appears fine visually in the form but when I click Batch
  
  Update
  
   I get the following exception.
   
   Started POST
  
  /admin/scaffolds/users/batch_update?eid=77a75ba90091a7c137efb8b09c3f7009
  
  
   for 127.0.0.1 at Wed Aug 03 16:39:06 -0400 2011
   
 SQL (2.5ms)   SELECT name

FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'

 Cloak Load (0.2ms)  SELECT cloaks.* FROM cloaks LIMIT 1
 CACHE (0.0ms)  SELECT cloaks.* FROM cloaks LIMIT 1
 Processing by Admin::Scaffolds::UsersController#batch_update as JS
 Parameters: {eid=77a75ba90091a7c137efb8b09c3f7009,
  
  commit=Batch
  
   Update, batch_scope=LISTED,
   authenticity_token=NVWU2Lc3+hSAU6NbYikn6gvImZsHpjJcj9W8Rx8tr/I=,
   utf8=\342\234\223,
   record={automatic_login={operator=REPLACE, value=1},
   note=, state=active}}
   
 AdminControllerAcl Load (0.3ms)  SELECT admin_controller_acls.*
 FROM
   
   admin_controller_acls WHERE (active = 't') LIMIT 1
   
 Admin Load (0.2ms)  SELECT admins.* FROM admins WHERE
 admins.id
  
  =
  
   1 LIMIT 1
   
 AdminRole Load (0.2ms)  SELECT admin_roles.* FROM admin_roles
 WHERE
   
   admin_roles.id = 1 LIMIT 1
   Completed 500 Internal Server Error in 45ms
   
   NoMethodError (undefined method `merge' for active:String):
   
   Rendered
  
  /Library/Ruby/Gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/middlewa
  re/templates/rescues/_trace.erb
  
   (1.0ms)
   Rendered
  
  /Library/Ruby/Gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/middlewa
  re/templates/rescues/_request_and_response.erb
  
   (130.4ms)
   Rendered
  
  /Library/Ruby/Gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/middlewa
  re/templates/rescues/diagnostics.erb
  
   within rescues/layout (135.8ms)
   
   It looks like something is expecting the state param to be a Hash,
   but
  
  its
  
   just a string because I did not select it as an attribute to be
   changed.
   
   I think it has to do with the fact that I am using a form override for
  
  some
  
   of the attributes. For example:
 def state_form_column(record, input_name)
 
   select(:record, :state, User::STATES, { :include_blank = false })
 
 end
   
   I want the state field to be a select dropdown instead of a textbox.
  
  This
  
   works fine with the normal update action. How can I fix the helper to
   be compatible with batch_update?
   
   rails 3.0.9 and rails-3.0 branch.
   
   Appreciate any help. Thanks.
  
  --
  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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: standard search and field search at the same time

2011-08-05 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 4 de Agosto de 2011 20:38:10 Nick Rogers escribió:
 Is there some way to enable the regular (all fields) search and field
 search at the same time?
 
 For example:
 config.actions.add :search
 config.actions.add :field_search
 
 To result in two action links.
 
 Thanks.

No, search and field_search add the same controller methods and use the same 
routes, so they are incompatible actions

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Disabling association query

2011-08-04 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 28 de Julio de 2011 23:10:31 Alan escribió:
 Here is a simplified snippet of code that I have:
 ===
 == class Approval  ActiveRecord::Base
   belongs_to :user
   belongs_to :event
 end
 ---
 -- class Admin::ApprovalsController  Admin::AdminController
   active_scaffold do |config|
   config.columns = [:user, :event, :status, :created_at]
   end
 end
 ---
 -- module Admin::ApprovalsHelper
 end
 ---
 -- class User  ActiveRecord::Base
   def to_label
   test
   end
 end
 ===
 ==
 
 By default, this will execute the following SQL:
   ←[1m←[36mSQL (0.0ms)←[0m  ←[1mSELECT COUNT(*) FROM `approvals`←[0m
   ←[1m←[35mApproval Load (1.0ms)←[0m  SELECT `approvals`.* FROM
 `approvals` ORDER BY `approvals`.`id` ASC LIMIT 15 OFFSET 0
   ←[1m←[36mUser Load (0.0ms)←[0m  ←[1mSELECT `users`.* FROM `users`
 WHERE (`users`.`id` IN (106,9,2820,1,2,3351,500))←[0m
   ←[1m←[35mEvent Load (1.0ms)←[0m  SELECT `events`.* FROM `events`
 WHERE (`events`.`id` IN (24,25,26,15,1))
 
 Is it possible to optimize this, so that it only loads the columns
 that I specify? and so that it does it in a single query w/ joins?
 

You won't get better performance getting all associations in a query. It was 
like that in previous rails versions and it was changed becuase it was better 
to get associations in different queries.

You can force rails to load associations in the same query setting conditions 
about the association, but then rails doesn't allow you to set select in the 
query.

However, you are right it's better to get only needed columns for 
associations, but rails doesn't have a way to do it, it's a ActiveRecord 
limitation.

The best you can do is using virtual columns, as you said, include user_id 
instead of user and override column with a helper to display a link.

I have found eload-select plugin, but it's old and unmaintained, only for 
rails 2.3

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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.



rails 3.x

2011-08-03 Thread Sergio Cambra .:: entreCables S.L. ::.
I have been working last weeks with rails 3.0 and vhochstein's fork. While 
trying the fork I added some commits from master branch (now named as v2.4) 
which was missing in vhochstein's fork, and fixing some bugs I found.

Now I have committed the work of these weeks to rails-3.0 branch. Master 
branch works with rails 3.1, it's like vhochstein's repo with changes I added 
to rails-3.0 branch. However I think there are some bits which don't work.

I will release a gem in some days, I suppose it will be named active_scaffold, 
without _vho suffix, and it will continue with next active_scaffold_vho version.


-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: ActionLinks fails from Embedded Scaffolds

2011-06-24 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 23 de Junio de 2011 21:58:15 SOREN CHRISTENSEN escribió:
 Hi,
 
 I have several ActionLinks that I use extensively all over my app.
 
 I have several of these being used in embedded versions. But the
 ActionLinks that I have added using:
 
 54  config.action_links.add groups,
  55:controller = product_groups,
  56:action = :index,
  57:label = Product Groups,
  58:page = true
 
 All have an eid parameter set on them, and therefore fails.
 
 How do I get rid of the EID?
 
 /S

Try adding :parameters = {:eid = nil}

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: is the field overrides documentation lying to me?

2011-06-23 Thread Sergio Cambra .:: entreCables S.L. ::.
On Jueves, 23 de Junio de 2011 01:38:38 patrick99e99 escribió:
  for rails 3.0:
  def roles_column(record)
foobar!
  end
 
 Ah.. Ok, yeah that works for me...  Now the next question is, is it
 possible to change the url that a association goes to?  For example,
 hovering over a user's role takes me to the edit action of that role--
 but I really want to just specify an arbitrary url, not having
 anything to do with active_scaffold...
 
 is this possible?

Yes, you must use set_link in the association column

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: having a problem with beginning_of_chain and ordering

2011-06-22 Thread Sergio Cambra .:: entreCables S.L. ::.
On Lunes, 20 de Junio de 2011 21:00:13 patrick99e99 escribió:
  Did you read documentation about sort and sort_by
  at:https://github.com/activescaffold/active_scaffold/wiki/API%3A-Column
  ??
 
 Hi,
 
 Yes, I did..  I couldn't figure out how to get that to work..  I have
 a method on my model which returns a number based off of calculations
 done on some of the other columns in the database-- so this is a
 virtual column.
 
 So I tried doing:
 config.list.columns = [:my_virtual_column]
 columns[:my_virtual_column].sort = true
 columns[:my_virtual_column].sort_by :method = 'my_virtual_column'
 
 but I get the following error:
 You have a nil object when you didn't expect it!
 You might have expected an instance of Array.
 The error occurred while evaluating nil.sort_by
 
 which I assume is because it's a virtual column.

You must add the virtual column to config.columns, then it will be added to all 
actions so you will have to exclude it from update and create actions

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: defining config.actions breaks has_many associations ?

2011-06-22 Thread Sergio Cambra .:: entreCables S.L. ::.
Which ActiveScaffold version are you using?

On Martes, 21 de Junio de 2011 18:26:39 patrick99e99 escribió:
 Hi,
 
 I just found a very strange thing...  I have two models, User and
 Post..  User has_many :posts, Post belongs_to :user.
 
 Everything was working fine in ActiveScaffold when I'd view the user
 list--  I could click on a post url and it would reveal only the posts
 for that user.
 
 However, once I introduced into my post controller:
 
 config.actions = [:list]
 
 To limit the actions, and not have edit/create/delete links, then
 suddenly when clicking on a user's posts, ActiveScaffold shows me
 Post.all instead of user.posts
 
 ...  Is this a known issue?
 
 Thanks.
 -Patrick

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: vhochstein fork: HTML Tags after create/update

2011-06-14 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 14 de Junio de 2011 05:38:51 Bernardo escribió:
 Hi, i'm using vhochstein fork with rails 3.0.8 and ruby 1.9.2.
 
 After i create or update a record, some html tags pops up inside the
 created/updated record.
 The tags are not saved in the DB, looks like its just a malformed html
 when AS renders the record list.
 
 i.e:
 Chaves tdTue, 14 Jun 2011 02:16:19 td   Tue, 14 Jun 2011 03:02:57
 td
 loading td   Editatd   Deleteatd Showatd trtabletd tr
 
 After i reload the page the tags just vanish (html rendered
 correctly).
 
 Someone had this issue or knows how to fix it?
 
 Thanks in advance.

In a previous post volker said rails 3.0.8 is buggy and it works with 3.0.7 or 
3.0.9.rc3

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: What happened to http://www.activescaffold.com ?

2011-06-03 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 3 de Junio de 2011 09:51:52 cschlaefcke escribió:
 The official reference would be on github (https://github.com/
 activescaffold/active_scaffold/wiki/) then?
 


Official reference is on github wiki. In activescaffold.com doc link goes to 
github wiki too. I have access to publish in activescaffold.com but I don't 
know what is the hosting and why is failing.

 On 2 Jun., 15:25, Hernan Astudillo naa...@gmail.com wrote:
  dunno... either way, it's quite outdated... so outdated that anyone
  knows who's got access to update it.
  Maybe richard white knows...
  
  On Thu, Jun 2, 2011 at 4:35 AM, cschlaefcke cschlaef...@wms-network.de 
wrote:
   Hi Folks,
   
   this site does not seem to be reachable anymore. Is it just
   temporarily offline or did it move somewhere else? I hope its not
   vanished forever...
   
   Regards,
   
   Christian
   
   --
   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 athttp://groups.google.com/group/activescaffold?hl=en.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: What happened to http://www.activescaffold.com ?

2011-06-03 Thread Sergio Cambra .:: entreCables S.L. ::.
On Viernes, 3 de Junio de 2011 14:41:25 Hernan Astudillo escribió:
 according to zone information, it belongs to rimuhosting.com
 Maybe if you use the control panel available in that site with the
 user/pass you could look out, like some message from the hosting.

There were multiple users and pass in activescaffold.com admin zone, and I had 
my own user and pass. So I can access to hosting control panel with my user 
and pass for activescaffold.com

 
 We should freshen up that site. don't you think?

Yes, you are right.

 
 
 On Fri, Jun 3, 2011 at 6:30 AM, Sergio Cambra .:: entreCables S.L. ::.
 
 ser...@entrecables.com wrote:
  On Viernes, 3 de Junio de 2011 09:51:52 cschlaefcke escribió:
  The official reference would be on github (https://github.com/
  activescaffold/active_scaffold/wiki/) then?
  
  Official reference is on github wiki. In activescaffold.com doc link goes
  to github wiki too. I have access to publish in activescaffold.com but I
  don't know what is the hosting and why is failing.
  
  On 2 Jun., 15:25, Hernan Astudillo naa...@gmail.com wrote:
   dunno... either way, it's quite outdated... so outdated that anyone
   knows who's got access to update it.
   Maybe richard white knows...
   
   On Thu, Jun 2, 2011 at 4:35 AM, cschlaefcke
   cschlaef...@wms-network.de
  
  wrote:
Hi Folks,

this site does not seem to be reachable anymore. Is it just
temporarily offline or did it move somewhere else? I hope its not
vanished forever...

Regards,

Christian

--
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 athttp://groups.google.com/group/activescaffold?hl=en.
  
  --
  Sergio Cambra .:: entreCables S.L. ::.
  Mariana Pineda 23, 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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: search on association

2011-05-24 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 24 de Mayo de 2011 02:25:19 Richard Zheng escribió:
 Hi,
 
 I have looked into
 https://github.com/activescaffold/active_scaffold/wiki/Search-on-second-ord
 er-association. But still not sure how to do what I need.
 
 Company has_many employees. A search on company needs to search fields in
 company and also employees'. We are particularly interested in field
 first_name, last_name, office_phone and cell_phone in table employees.
 Would something like the following work?
 
 class CompaniesController  ApplicationController
 
   config.search.columns  :employee
 config.columns[:employee].search_sql = employees.first_name ### how to
 put last_name and other field?
  config.columns[:employee].search_ui = :string # optional
  config.columns[:employee].options[:string_comparators] = true # optional

Try adding virtual columns to search columns and set the search_sql

 
 end
 
 
 Any suggestion?
 
 Thanks,
 Richard

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Searching in IE9

2011-05-24 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 24 de Mayo de 2011 10:34:31 johnnybutler7 escribió:
 Apparently searching in IE9 returns a blank screen.  I cant test this
 my self as i dont have IE9 and my IE emulator only supports IE8.  Is
 there a patch for this anywhere?
 
 JB

No, I can't try it neither.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Performance problem

2011-05-03 Thread Sergio Cambra .:: entreCables S.L. ::.
On Martes, 3 de Mayo de 2011 07:50:25 Michael Latta escribió:
 I found at least some of it.  There are 5 associations formatted as
 selects.  There are a large number (5) of select associations per record
 and with 50 records each record spends about 20 ms generating options,
 sorting the collections and so on.  There has to be a way to cache those
 options to save a lot of time.

You can override options_for_association to cache options for each 
association:
def options_for_association(association, include_all = false)
  options_cache = include_all ? @options_cache_all||={} : @options_cache||={}
  options_cache[association.name] ||= super
end

It will work only if options must be the same for all records in all subforms.

 
 Michael
 
 On May 2, 2011, at 11:31 PM, Michael Latta wrote:
  I have a form that is performing very badly.  The form has a large number
  of sub-form records being displayed: 50 or so.
  
  The log shows 200-300 ms for the horizontal header, and about 100 ms for
  each record.  The attribute partials account for about 42 ms of the 100
  per record.
  
  When I attempt to measure the code executed by the header template it is
  more like 1-2 ms for the calls like getting the config or testing
  columns for hidden.
  
  The total query time reported is  20 ms and the view time reported is 
  10 ms
  
  The records have a large number of  association columns with form_ui
  :select.
  
  This is on the VHO fork as a gem under 1.9.2p180.
  
  Michael

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Password Fields Shown in Clear Text

2011-04-27 Thread Sergio Cambra .:: entreCables S.L. ::.
On Miércoles, 27 de Abril de 2011 00:56:08 Lee escribió:
 I'm using ActiveScaffold with AuthLogic, and have fields password
 and password_confirmation defined in my controller (but not the
 underlying table). AuthLogic automatically takes these fields and
 populates the underlying crypted_password and password_salt fields.
 All that is working fine. However, when creating a new record,
 ActiveScaffold shows the password and password_confirmation fields
 in clear text, in the create form

Set form_ui to :password to fix forms

 and then in the list after the save.
 If I refresh the list it correctly shows them as dashes, but if
 anyone's looking on or scraping my screen then the damage is done.
 
 Any ideas on how to force those two fields to display as dashes or
 astericks, preferably from the controller so that it will apply to all
 views?

I think you should remove from list view, if they will be always dashes.
Also, you can add a field override, like model_password_column and 
model_password_confirmation_column, to return dash or asterisk. It will be used 
in list and show views.

 
 Thanks for any help.
 
 Lee

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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: Remove related children column from parent list view but not parent edit form

2011-04-25 Thread Sergio Cambra .:: entreCables S.L. ::.
On Sábado, 23 de Abril de 2011 00:56:25 Lee escribió:
 I have a one-to-many association in my app and want to list the parent
 records without showing all the children in one of the columns, but
 keep the default edit form which shows the list of related children
 below the parent fields. If I set the columns in the parent controller
 with conf.columns and exclude the related children column, it removes
 the list of children from the edit form also.
 
 Thanks for any help or ideas.

Remove it from list columns:
config.list.columns.exclude :children

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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.



  1   2   3   4   5   6   7   8   9   10   >