Re: Another question regarding batch_create

2011-04-13 Thread mrbana...@googlemail.com
Hi Michael, no, that s not possible. The only supported feature is. Take a list of parent records and create for one association child objects. Attributes for the child objects can be defined in a "normal" new form, which means all child objects have the same attribute values, except obviously fo

Re: list action renders XML instead of HTML

2010-10-26 Thread mrbana...@googlemail.com
Hi, Well I think, that nobody is able to help you if you do not provide more detailled information. A good starting point: rails log for your request (development.log) At least I can assure you that it should work. :-) -- Volker On 25 Okt., 20:53, Yuriy Padlyak wrote: > Any ideas? I'm still

Re: set_link

2010-10-26 Thread mrbana...@googlemail.com
Hi, Take a look into view_helpers.rb there you should find the code, which generates a link from an action_link object. -- Volker On 26 Okt., 09:52, Richard Zheng wrote: > Hi, > > I am trying to avoid set_link and do it with field override. This way I can > control some rows have links while o

Re: Unable to get field override to work

2010-10-05 Thread mrbana...@googlemail.com
Hi Mike, Take a look at column's 'clear_link' option. http://github.com/activescaffold/active_scaffold/wiki/API%3A-Column -- Volker On 5 Okt., 17:26, MikeBlyth wrote: > I want a list of contacts to display without the contact name being > linked (clickable) even though it's related in Rails. I'

Re: about use the ActiveScaffold error message

2010-10-05 Thread mrbana...@googlemail.com
Hi Gary, Let me summarize what I think you have done: You are on Rails 3 and used the "Getting Started" Section of activescaffold wiki? That will not work, cause active_scaffold is nt prepared for rails 3. It is true that there is a fork for rails 3, but if you are using that, you cannot use Get

Re: delete_authorized? in the ApplicationController

2010-09-16 Thread mrbana...@googlemail.com
Hi, that s because mixed in module methods have a higher priority than methods of a parent class. That means your method in Application controller never gets called. One easy way to fix this would be to directly override method in module delete: ActiveScaffold::Actions::Delete.class_eval do def

Re: Getting inplace_edit to respect controller _authorized? methods

2010-09-06 Thread mrbana...@googlemail.com
Hi, you might try the following in get_column_value (list_column_helper): elsif column.inplace_edit and controller.respond_to? (:update_authorized?) and controller.send(:update_authorized?) and record.authorized_for?(:action => :update, :column => column.name) -- Volker On Sep 3, 1:44 am, Poco

Re: config.columns[:somecol].label ... and subform create button

2010-08-26 Thread mrbana...@googlemail.com
Hi, You should add a model class translation. I suggest to take a look at the Rails Internationalization API: http://guides.rubyonrails.org/i18n.html#translations-for-active-record-models There you should find the answer to your question. As a generale rule you should try to miminize use of colum

Re: ActiveScaffold Paperclip Bridge

2010-08-20 Thread mrbana...@googlemail.com
Hi, yes, that s exactly what should happen. Please make sure that you have added the following to your model: has_attached_file -- Volker On Aug 19, 10:22 pm, ctpatt wrote: > I installed this plugin which promised to automatically recognize > Paperclip uploads within ActiveScaffold. Maybe

Re: ActiveScaffold.set_defaults in ApplicationController doesn't work

2010-08-20 Thread mrbana...@googlemail.com
Hi, if that block is inside of your ApplicationController class that should work. -- Volker On Aug 19, 7:12 pm, mikelb wrote: > It doesn't matter what I put in there, it just stares at me like  "... > and what are *you* trying to do?" > > I have this, for example: > > ActiveScaffold.set_default

Re: Geokit and Sort on virtual column

2010-08-19 Thread mrbana...@googlemail.com
1.) Well, you ve generated a recursive loop. You are calling in method distance method distance. 2.) Take a look at the activescaffold wiki: http://wiki.github.com/activescaffold/active_scaffold/search-overrides On Aug 19, 5:30 pm, gs84 wrote: > On 19 août, 08:05, "mrbana...@google

Re: custom validation callback doesn't work?

2010-08-19 Thread mrbana...@googlemail.com
ns 'save'/cancel > will remain on the screen. > > On 19 авг, 10:11, "mrbana...@googlemail.com" > > wrote: > > Hi, > > > validate_credit_limit > > you should return true if successfull and false in case validation > > failed. > > &

Re: ActiveScaffold+RecordSelect

2010-08-18 Thread mrbana...@googlemail.com
Hi, Cainlevy master branch versions of recordselect is for Rails 3. Either you upgrade to Rails 3 or you pick sergios fork of recordselect: http://github.com/scambra/recordselect -- Volker On Aug 18, 6:22 pm, John McKerrell wrote: > Hi > > Wondering if someone can help me. I've been trying sinc

Re: custom validation callback doesn't work?

2010-08-18 Thread mrbana...@googlemail.com
Hi, validate_credit_limit you should return true if successfull and false in case validation failed. -- Volker On Aug 18, 10:39 pm, "pavel.polyakov" wrote: > I got situation when I have validation in my controller and in my > activerecord class as well > controller: > class PaymentOrdersContro

Re: Geokit and Sort on virtual column

2010-08-18 Thread mrbana...@googlemail.com
Hi, 1) you need a virtual "distance" column in your offreservices model, which you have to set with calculated value. Either if its possible directly in your sql query or just afterwards in your do_list method 2) Generate your own search_ui type overwrite and set search_ui for that column to your

Re: ActiveScaffold on jQuery

2010-08-11 Thread mrbana...@googlemail.com
Hi, if you are ready for Rails 3 you may try this fork: http://github.com/vhochstein/active_scaffold it allows you to switch to jquery. -- Volker On Aug 6, 2:05 pm, Andrey Voronkov wrote: > I want to use in one of my applications jQuery only, but AS needs Prototype > (so jrails causes error). I

Re: Second Order Association problem

2010-08-01 Thread mrbana...@googlemail.com
define a to_label method in your product model -- Volker On Jul 30, 5:10 pm, Yuriy Padlyak wrote: > I've just removed 'config.actions.swap :search, :field_search' row > from by controller and error gone. But now 'Products' included as > second order association are displayed in list as: > > '# >

Re: Ancestry + ActiveScaffold Nested

2010-07-26 Thread mrbana...@googlemail.com
> > Just has_many :children or has_many :something? > > > 2010/7/26 mrbana...@googlemail.com > > > Hi, > > >> children is a named scope in ancestry. AS Nesting requires an > >> association. I would suggest to create a children2 association in

Re: Ancestry + ActiveScaffold Nested

2010-07-25 Thread mrbana...@googlemail.com
Hi, children is a named scope in ancestry. AS Nesting requires an association. I would suggest to create a children2 association in your model, which you may use in your nested.add_link call. -- Volker On Jul 26, 5:59 am, Andrey Voronkov wrote: > I'm trying to make work together > Ancestry

Re: Different action_link per member depending on a member field value

2010-07-08 Thread mrbana...@googlemail.com
Hi, If I understand you right, you need a way to just not display a record action_link based on record conditions. Actionlink enable if record actionlink disable if record You may take a look at: http://github.com/vhochstein/active_scaffold/commit/f8b173cb1f7483b752f04f901c86429cc0c8f419

Re: Anyone tried this Rails 3 fork?

2010-07-01 Thread mrbana...@googlemail.com
Hi, Well, would be great if you could be a little bit more specific? What errors do you get? -- Volker On Jun 30, 9:16 am, trung wrote: > http://github.com/vhochstein/active_scaffold > > I didn't have any luck getting it to work with Rails 3 beta 4. > But let me know if you figured out how to m

Re: Trying to assign a user_id to a Post on create or update

2010-06-24 Thread mrbana...@googlemail.com
Hi, the easy way is to define a to_label method in your user model def to_label self.username end Please take also a look at the documentation: http://wiki.github.com/activescaffold/active_scaffold/faq#faq_3 -- Volker On 25 Jun., 00:33, stephen murdoch wrote: > hi thanks a lot for your he

Re: Escaped string on Rails 2.3.8 when it should be unescaped

2010-06-24 Thread mrbana...@googlemail.com
Hi, well, there are actually more places in activescaffold that have to be fixed. Master branch is on the way to find all places. So, I would suggest to upgrade your activescaffold version to latest. and in addition take a look at the following: http://railscasts.com/episodes/204-xss-protection-i

Re: How to display values for columns on create from the previous record

2010-06-23 Thread mrbana...@googlemail.com
Hi, if you do not want to set that value in general but only for that specific controller you may override do_new def do_new super @record.xyz = default_value @record end if you want to only set the default value if you are nested you can also check if you are currently nested, please take

Re: AS with jrail and jQuery issue

2010-06-23 Thread mrbana...@googlemail.com
http://api.prototypejs.org/dom/element/scrollto/ Jefflin schrieb: > Hi: > > I am using AS with jrail and jQuery for my project. It has been > working fine for a while. > > Recently, I updated AS. the problem I have is that after updated AS, > when updating/creating record with failed validation, A

Re: Re-render action link table actions on destroy a record

2010-06-20 Thread mrbana...@googlemail.com
Hi, you have to add some javascript code to get that running: parent = your first div which you are replacing new ActiveScaffold.Actions.Table(parent.select('a.as_action'), parent.up('div.active-scaffold').down('tbody.before-header'), parent.down('.loading-indicator')) -- Volker On Jun 20, 1:4

Re: ActionView::TemplateError

2010-06-16 Thread mrbana...@googlemail.com
Hi, seems you have nt installed render_component plugin: script/plugin install git://github.com/ewildgoose/render_component.git -r rails-2.3 -- Volker On Jun 17, 2:04 am, chdem wrote: > Hi ! > > I'm trying to use ActiveRecord with a HABTM configuration and after > have make some modifications

Re: pagination = false doesn't work when sorting by foreign key

2010-06-10 Thread mrbana...@googlemail.com
Hi, that s an easy fix: in finder.rb change the following: pager = ::Paginator.new(count, options[:per_page]) do |offset, per_page| sorted_collection = sort_collection_by_column(klass.all(finder_options), *options[:sorting].first) sorted_collection.slice(offset, per_page) if o

Re: locale stuff

2010-06-09 Thread mrbana...@googlemail.com
Hi, There is no reason for it, it s just that you had to choose between the two options... Seems it was the wrong decision. :-) -- Volker On Jun 10, 1:04 am, Kenneth Ortmann wrote: > Is there any reason that the en.rb, de.rb, and fr.rb locale files have not > been switched to yaml format? > > I

Re: inplace_edit and column override

2010-06-07 Thread mrbana...@googlemail.com
ms a really ugly hack, although it works. > Is there a better way? > > def format_column_value(record, column) >   return number_to_phone(record.send(column.name)) if column == 'cell' >   super > end > > On Sun, Jun 6, 2010 at 8:54 PM, mrbana...@googlemail.com < >

Re: inplace_edit and column override

2010-06-06 Thread mrbana...@googlemail.com
Hi, Please use columns[:cell].inplace_edit = :ajax, this will use an ajax request each time you click inplace_edit, which should pick up your column override. inplace_edit = true works only with default form fields, but has the advantage of not generating an ajax request each time. -- Volker

Re: Active Scaffold breaks Mongrel

2010-05-26 Thread mrbana...@googlemail.com
27;m anxious to get A.S. working.   I hope my log helps you in > determining my failure(s). > > Best wishes, > Richard > > On May 21, 2:26 am, "mrbana...@googlemail.com" > > > > wrote: > > Hi, > > > I would bet that you have nt in

Re: Active Scaffold breaks Mongrel

2010-05-20 Thread mrbana...@googlemail.com
Hi, I would bet that you have nt installed the master branch of activescaffold, but the rails-2.2_22July09 branch. K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/vendor/plugins/active_scaffold/ lib/extensions/generic_view_paths.rb:46 that file does nt even have 46 lines in master branch. But if you tak

Re: field_search and NULL values

2010-05-19 Thread mrbana...@googlemail.com
Hi, Sure, there is something you can do to get it. One option: Extend with NULL and NOT NULL NumericComparators = [ '=', '>=', '<=', '>', '<', '!=', 'BETWEEN' ] adapt condition_for_integer_type to support your new NULL and NOT NULL options -- Volker

Re: Active Scaffold breaks Mongrel

2010-05-19 Thread mrbana...@googlemail.com
Hi, 1. I can assure you, that activescaffold is working with Rails 2.3.5 and mongrel in general. :-) 2. can you please try to start with webrick and please remove any backtrace silencers (conf/initiliazers) If webrick also fails please send the complete backtrace and additional plugins you are u

Re: Download which? + Installation questions

2010-05-18 Thread mrbana...@googlemail.com
Hi, Nowadays, the documentation for the project can be find here: http://wiki.github.com/activescaffold/active_scaffold/ The "getting started" section describes what you should do to get activescaffold up and running: http://wiki.github.com/activescaffold/active_scaffold/getting-started Getting

Re: relation's problem

2010-05-11 Thread mrbana...@googlemail.com
Hi, t.integer "teachers_id" should be t.integer "teacher_id" Not sure if that is the origin of your issue, but give it a try. If not please remove all the backtrace silencers in backtrace_silencers.rb -- Volker On May 11, 3:29 pm, Mosiah wrote: > I have a problem when I add a relation cond

Re: Model's after_save() and AS notification on error

2010-05-10 Thread mrbana...@googlemail.com
Hi, if the model does not care if the xmlrpc command fails (save command succeeds), i would add a method to the model indicating if xmlrpc fails succeeds and query that in your controller to add a flash message. -- Volker On May 9, 2:57 am, Iñaki Baz Castillo wrote: > 2010/5/8 Iñaki Baz Castill

Re: Dynamically add security methods to models

2010-04-29 Thread mrbana...@googlemail.com
Hi, I am wondering why you would like to add these methods add all to the model. If you moved model authorization to a db based system you do not need these anymore. I would suggest to adapt the authorization system of activescaffold to call your specific functions. -- Volker On 27 Apr., 05:56,

Re: Multi-select with checkbox in list view - any new ideas?

2010-04-29 Thread mrbana...@googlemail.com
n the layout, or override list.html.erb in your > app/views/config7960s directory: > [YOUR HTML] > <%= render :super %> > > > > > > > On Apr 28, 2:29 am, "mrbana...@googlemail.com" > > > wrote: > > > Hi, > > > > if you click

Re: ActiveScaffold and cache_sweeper

2010-04-29 Thread mrbana...@googlemail.com
UD action. > But the sweeper gets never called and the cache never refreshed, > because I have no actions to bind the call to home_sweeper to. I would > like it to be triggered after every CRUD action on the products. With > normal rails scaffolding I would use > > cache_sweeper :li

Re: large association table

2010-04-28 Thread mrbana...@googlemail.com
Hi, List view works for me without count query. If I have a has_many relation. 1. includes = [] 2. list_column_helper for column returns static string Which version of AS are you using? -- Volker On 27 Apr., 23:05, Richard Zheng wrote: > Hi, > > We have a large association table and it's slow

Re: ActiveScaffold and cache_sweeper

2010-04-27 Thread mrbana...@googlemail.com
Hi, Can you please explain a little bit what you would exactly like to cache? -- volker On 27 Apr., 01:19, MrUbi wrote: > Hello, > > this may seem trivial, but it's getting a nightmare since my cache is > never been refreshed :) > I am using activescaffold in the admin area (namespace). There a

Re: Multi-select with checkbox in list view - any new ideas?

2010-04-27 Thread mrbana...@googlemail.com
o be like that ?? > > thx > > On Apr 27, 8:06 am, Atastor wrote: > > > > > Nice! Any plans to merge this into master? > > > Regards > > Michael > > > On 27 Apr., 08:58, "mrbana...@googlemail.com" > > > wrote: > > >

Re: Multi-select with checkbox in list view - any new ideas?

2010-04-26 Thread mrbana...@googlemail.com
Hi, Take a look at http://github.com/vhochstein/active_scaffold/commit/30ceee8bd7e1a33f865c538830349ad7cee60624 Should provide you exactly what you need. If you integrate these changes into your active_scaffold, you can simply do the following: conf.actions.add :mark This will automatically add

Re: attachment_fu problem... please, please help...

2010-04-25 Thread mrbana...@googlemail.com
Hi, ActionView::TemplateError (undefined method `render_component' for indicates that you have nt installed the render_component plugin: ./script/plugin install git://github.com/ewildgoose/render_component.git -r rails-2.3 -- Volker On 23 Apr., 17:52, Russell wrote: > Update : I've narrowed

Re: Multi-select with checkbox in list view - any new ideas?

2010-04-15 Thread mrbana...@googlemail.com
Hi, That might work if all your records are on one page. If you need more than one page than it s getting more complicated. Or lets assume you would need to perform some search actions to find all records you need to select. I think, you will need a place (session, db) where you store that user x

Re: private method `gsub' called

2010-03-29 Thread mrbana...@googlemail.com
Hi, Method signature has changed for form column overrides. instead of just the the input_name, you get now the full options hash as second parameter. input_name can be accessed with options[:name]. -- Volker On 29 Mrz., 22:09, Soren Christensen wrote: > Hi, > > The new version of as throws th

Re: Error with form_column overrides

2010-03-29 Thread mrbana...@googlemail.com
Hi, Method signature has changed for form column overrides. instead of just the the input_name, you get now the full options hash as second parameter. Thats why :name => input_name + '[id]' is failing. -- Volker On 28 Mrz., 19:28, ruinen wrote: > I was using a version from 2010-02-06 with no

Re: Formats

2010-03-10 Thread mrbana...@googlemail.com
Hi, I bet there are some forks/plugins/extensions out there which will do it for you. However, some thoughts... Exporting to csv or xml should nt be a big deal with format option. Actually you can do xml and json and yaml already in activescaffold. The tricky part will be to get that part done fo

Re: AS not honoring config.list.sorting?

2010-03-09 Thread mrbana...@googlemail.com
Hi, please remove the following line in your configuration: config.columns[:effective_date].sort = false -- Volker On 7 Mrz., 20:27, scrozier wrote: > Newb question. AS doesn't seem to be honoring my config.list.sorting > definition. Instead, the SQL issued has no ordering specified. > > Here's

Re: How can i show images on Active Scaffold and File Column?

2010-03-09 Thread mrbana...@googlemail.com
Hi, this version of file_column is designed to work with activescaffold out of the box: http://github.com/activescaffold/file_column If you do not use that one already... I would suggest to do it.. If you install RMagick you can configure file_column to create a thumbnail image automatically afte

Re: AS not honoring config.list.sorting?

2010-03-09 Thread mrbana...@googlemail.com
le to have the rows sorted without allowing user- > invoked sorting? > > (I realize I can handle this outside of Active Scaffold; just seems > like AS should handle this particular combination.) > > Thanks, > > Steve > > On Mar 8, 4:06 am, "mrbana...@goog

Re: How can i show images on Active Scaffold and File Column?

2010-03-08 Thread mrbana...@googlemail.com
Hi, yes, thats basically what you have to do. You just have to tell file_column that you want to create a thumbnail: file_column :image, :magick => {:versions => { "thumb" => "50x50"}} and tell activescaffold that you want to show the thumbnail. conf.columns[:image].list_ui = :thumbnail" At lea

Re: AS not honoring config.list.sorting?

2010-03-08 Thread mrbana...@googlemail.com
Hi, please remove the following line in your configuration: config.columns[:effective_date].sort = false -- Volker On 7 Mrz., 20:27, scrozier wrote: > Newb question. AS doesn't seem to be honoring my config.list.sorting > definition. Instead, the SQL issued has no ordering specified. > > Here's

Re: How can i show images on Active Scaffold and File Column?

2010-03-08 Thread mrbana...@googlemail.com
Hi, this version of file_column is designed to work with activescaffold out of the box: http://github.com/activescaffold/file_column If you do not use that one already... I would suggest to do it.. If you install RMagick you can configure file_column to create a thumbnail image automatically afte

Re: Filtering list output (order by distance) via distance calculated by a controller method

2010-02-25 Thread mrbana...@googlemail.com
Hi, I would suggest the following options: 1. calculate distance in your sql statement and order by the calculated distance 2. calculate distance in your model and use activescaffolds method based sorting 3. Hack the list action of activescaffold and reorder the resultset on your own Option 3 is

Re: Using named_scopes_for_collection to filter nested scaffolds

2010-02-23 Thread mrbana...@googlemail.com
Hi, If you are really on the latest version of activescaffold please try and set he following in your controller: conf.list.pagination = :infinite Seems that AS Count query is making trouble. pagination = :infinite does not need a count query. -- Volker On 23 Feb., 21:41, Benjamin Adler wrote:

Re: redirection after an AS action

2010-02-22 Thread mrbana...@googlemail.com
Nothing happens means... 1. create is triggered, but not your on_create.js.rjs. or 2. even create is not triggered. For option 1 I would check if your create form is triggering a "normal" html request and not an ajax request. -- Volker On 22 Feb., 22:20, Soren Christensen wrote: > I'm sure tha

Re: Using named_scopes_for_collection to filter nested scaffolds

2010-02-22 Thread mrbana...@googlemail.com
Hi, You cannot assign a named_scope to a nested.add_link configuration. However, you can go to your car controller. - Implement named_scopes_for_collection method. - Detect if you controller is in nested_mode: nested? - get your parent_record: parent_record = find_if_allowed(nested_parent_id, :re

Re: Calculated Default Values for Forms

2010-02-22 Thread mrbana...@googlemail.com
I would vote for a slightly different version: def do_new super @record.due_date = 1.hour.from_now ... end -- Volker On 19 Feb., 20:52, Soren Christensen wrote: > You can use do_new to do what you are asking, assuming that this is > something that happens when you create a new assignment.

Re: label pluralization via locale in list header

2010-02-03 Thread mrbana...@googlemail.com
Hi, Ok, I ve forgottten one line in my example: activerecord: models: admin: one: Administrator other: Administrators -- Volker On 2 Feb., 19:51, Nick Rogers wrote: > On Tue, Feb 2, 2010 at 12:08 AM, mrbana...@googlemail.com < > > mrbana...@googlemai

Re: What causes the undefined method `create' for # (NoMethodError)

2010-02-02 Thread mrbana...@googlemail.com
Hi, what happens at campaigns_controller.rb line 7 ?? Looks like AS tries to load columns to create action, but create action is nt included. -- Volker On 1 Feb., 18:17, Soren wrote: > I get a number of these errors - what do they mean - and how do I get > rid of them > > /vendor/plugins/acti

Re: label pluralization via locale in list header

2010-02-02 Thread mrbana...@googlemail.com
Hi, Rails i18n modul expects plural forms in your yml file. change your localization file: en: activerecord: models: one: Administrator other: Administrators On 1 Feb., 23:15, Nick Rogers wrote: > I have my model's labels defined in my locale file (en.yml) as such... > > en:

Re: Override the record?

2010-02-02 Thread mrbana...@googlemail.com
Hi, if you are using current version of activescaffold I would recommend to also take a look at using named scopes: http://wiki.github.com/activescaffold/active_scaffold/api-list def named_scopes_for_collection end -- Volker On 1 Feb., 20:29, Brian Cardarella wrote: > @kenny, > >   Awesome, th

Re: BUG ? - simple has_many :through does not work

2010-02-01 Thread mrbana...@googlemail.com
Hi, Well, I would suggest to do the following: class User < ActiveRecord::Base has_many :schoolclass_users has_many :schoolclasses, :through => :schoolclass_users end class Schoolclass < ActiveRecord::Base has_many :schoolclass_users has_many :users, :through => :schoolclass_users end I

Re: Changing the column override sorting

2010-01-31 Thread mrbana...@googlemail.com
Hi, uh, that are quite outdated system components. I ve you roll back your "new additions to the list" everything is working as expected?? -- Volker On 29 Jan., 16:01, DW wrote: > The column is an association, the active scaffold is of a database of > projects, and the departments column is t

Re: Changing the column override sorting

2010-01-29 Thread mrbana...@googlemail.com
Hi, could you please provide some more details. The column is an association? or just of type :string? If it is of type string it should work. If it is of type association please post your active_scaffold configuration. -- Volker On 28 Jan., 17:09, DW wrote: > Hello, > Is there a way to change

Re: Debugging links_for_associations

2010-01-29 Thread mrbana...@googlemail.com
Hi, Rails is complaining about a missing school_class_user association in School model. I would recommend to add one: has_many :school_class_users Same might be necessary on the other side of through association. -- Volker On 29 Jan., 08:50, Soren wrote: > Progress > > All my ordinary associ

Re: tweaking the AJAX response on create

2010-01-28 Thread mrbana...@googlemail.com
Hi, you may try the following in your subscriptions controller: Not beautiful, but should give you a starting point. def create_respond_to_js if successful? do_list render :update do |page| cancel_selector = "##{element_form_id(:action => :create)} a.cancel".to_json

Re: Debugging links_for_associations

2010-01-27 Thread mrbana...@googlemail.com
Hi Soeren, 1. ActiveRecord Association modul uses internally an instance variable klass. nil.klass exception is happening if something with the association is for whatever reason not correct. Would be great if you could debug which association is making trouble. 2. undefined method `create' for #

Re: create successful?

2010-01-19 Thread mrbana...@googlemail.com
Hi, I would recommend instead of overriding create... just do the following in your controller: def after_create_save(record) flash[:info] = 'Good job' end -- Volker On 19 Jan., 10:28, rvhi wrote: > Hi, > > I want the 'create' method to show the result in a flash. So I define > this in the c

Re: ActiveScaffold documentation homepage vs. wiki

2010-01-14 Thread mrbana...@googlemail.com
Hi, Documentation at github is the most updated. -- Volker On 14 Jan., 16:46, Jesper Rønn-Jensen wrote: > hey > > ActiveScaffold documentation is available both > athttp://activescaffold.com/docs/api-core > andhttp://wiki.github.com/activescaffold/active_scaffold/api-core > > Which one is the

Re: Multiple Edit Link per row

2010-01-13 Thread mrbana...@googlemail.com
Hi, I would add additional action links, which trigger edit form with an additional param. Check for param in a before filter and set update column list dynamically depending on the param. -- Volker On 13 Jan., 06:55, LFung wrote: > Hi, > > I have a big table with several columns. I would like

Re: When reloading data, ActiveScaffold fails

2010-01-13 Thread mrbana...@googlemail.com
Hi, It s working perfectly on my side. Therefore I would think that you accidently have overwritten some active scaffold methods. I would suggest to take a look into actions/list.rb. There you will find the corresponding methods for update_table and please check if these methods get actually calle

Re: multi-select using :record_select

2010-01-08 Thread mrbana...@googlemail.com
Hi, ActiveScaffold will automatically pick multi-select version of recordselect in case of a plural association, which means there should be no difference between simple select and multi select from an activescaffold configuration perspective -- Volker On 7 Jan., 21:35, mikev wrote: > Is ther

Re: Controlling Field Order when dynamically add/exclude columns

2010-01-08 Thread mrbana...@googlemail.com
Hi, I ve tried with latest version of activescaffold Option1 : excluding and afterwards adding should work. At least for me. Option2 : There seems to be a bug, can you please try the following: active_scaffold_config.list.columns = [:image, :name] active_scaffold_config.list.columns.set_columns

Re: Changing truncate.length for specific AS columns

2010-01-07 Thread mrbana...@googlemail.com
to nil? > > Thanks > > On Jan 6, 7:57 am, "mrbana...@googlemail.com" > > wrote: > > Hi, > > > in your active scaffold configuration for your controller you may > > define: > > > conf.columns[:col_name].options = {:truncate => 100} > > >

Re: Changing number of nested in the to_label (List)

2010-01-06 Thread mrbana...@googlemail.com
ard > AS view without the user needing to click the to_label... > > Any ideas? > > Regards, > Matti Zemack, Broadcast Media Concultancy, Stockholm, Sweden > > On 06/01/2010 08:57, "mrbana...@googlemail.com" > wrote: > > > Hi, > > > in your activ

Re: passing params to multiple partials on one view

2010-01-06 Thread mrbana...@googlemail.com
Hi, Please rename your parameter :id to something else and see if that s working. -- Volker On 5 Jan., 14:08, "ala...@citrin.ch" wrote: > hello > > in a custom view i have 3 different lists e.g. > > = render :active_scaffold => 'companies' > = render :active_scaffold => 'customers' > = render :

Re: Changing truncate.length for specific AS columns

2010-01-05 Thread mrbana...@googlemail.com
Hi, in your active scaffold configuration for your controller you may define: conf.columns[:col_name].options = {:truncate => 100} -- Volker On 5 Jan., 11:00, timjd wrote: > I'm very new to ROR and AS, and am probably asking a very stupid > question.  I need to remove to expand the truncate.l

Re: Render HTML inside ActiveScaffold

2009-12-03 Thread mrbana...@googlemail.com
Hi, as a default activescaffold is html escaping any value in list views. If you want to allow html code you have to use a column list override. -- volker On 2 Dez., 18:28, PaP wrote: > Inside a list view > > On 2 Δεκ, 19:28, kenny.ortm...@gmail.com wrote: > > > Do you mean inside of a form or

Re: Subform text_field override

2009-12-02 Thread mrbana...@googlemail.com
Hi, Please check if active_scaffold_config.columns [:quantity] is nil -- Volker On 2 Dez., 07:12, Victor wrote: > I'm trying to override a subform field but am running into > difficulties. > > This is where I am: > > in purchases_helper.rb: > > def quantity_form_column(record, input_name) >    

Re: Rails 2.3.2 and Active Scaffold: some problems!!!

2009-12-01 Thread mrbana...@googlemail.com
ems/rails-2.3.2/lib/commands/server.rb: > 84 > > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require' > >         from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > 31:in `require' > >         from script/se

Re: Rails 2.3.2 and Active Scaffold: some problems!!!

2009-12-01 Thread mrbana...@googlemail.com
Could you please paste the complete error stack? -- volker On 30 Nov., 09:18, adc wrote: > No, i override only template!!! > > Thanks > > On 28 Nov, 19:00, "mrbana...@googlemail.com" > > wrote: > > Hi, > > > do you extend/override ActiveSca

Re: Chaining From Fields for multiple Fields ?

2009-12-01 Thread mrbana...@googlemail.com
Hi, you may try the following: in your activescaffold config: conf.columns[:attribute].options = {:update_column => [:attribute_1, :attribute_2]} add method to your controller: def after_render_field(record, column) record.attribute_1 = new_value record.attribute_2 = new_value2 end --

Re: Rails 2.3.2 and Active Scaffold: some problems!!!

2009-11-28 Thread mrbana...@googlemail.com
Hi, do you extend/override ActiveScaffold::Actions::Create in your application ? -- Volker On Nov 28, 10:00 am, adc wrote: > I update my application with rails 2.3.2 and the last version of > active scaffold and i installed render_component plugin. > > But, when i run my application this is a f

Re: association always open

2009-11-25 Thread mrbana...@googlemail.com
Hi, as far as I know that s not possible. I think you ve got two options: 1. Adapt AS to your needs (should nt be too difficult) 2. Try something on client side to open the association automatically. -- Volker On 25 Nov., 09:22, rvhi wrote: > Hi, > > I have a table of books. Each book has an a

Re: inplace_edit since v2.3

2009-11-24 Thread mrbana...@googlemail.com
Hi, There are two different flavours of inplace_edit. inplace_edit = :ajax When clicking inplace edit link server is asked to send corresponding input form. Might be used for Recordselect, Multiselect, dynamic data, ... inplace_edit = true When clicking inplace edit link input form will be copie

Re: deprecated for :select form_ui

2009-11-13 Thread mrbana...@googlemail.com
Hi, form_ui = :select is totally right. depreciation warning is just informing you that you should restructure your option hash for this column. form_ui :select finally calls rails helper: select(object, method, choices, options = {}, html_options = {}) . To distinguish html_options from "normal"

Re: Issues and patches: how submiting?

2009-11-12 Thread mrbana...@googlemail.com
Hi, I would say you ve got two options: 1. Learn how to use github (http://help.github.com/) and send your changes via pull requests: http://wiki.github.com/activescaffold/active_scaffold/pull-requests 2. Add your issues to issue tracker http://code.google.com/p/activescaffold/issues/list -- Vo

Re: How to use the Date formate from the localization file?

2009-10-26 Thread mrbana...@googlemail.com
Hi, ActiveScaffold is using default date format per default and at least in my configuration its working. you may add :format to columns options in your configuration to select a different one. Do you have this issue in list views or in forms? -- Volker On 25 Okt., 21:51, netdieter wrote:

Re: How to use "flash" in activescaffold?

2009-10-20 Thread mrbana...@googlemail.com
-- Volker On Oct 20, 6:25 pm, "Sergio Cambra .:: entreCables S.L. ::." wrote: > On Martes, 20 de Octubre de 2009 17:23:37 Iñaki Baz Castillo escribió: > > > > > El Martes, 20 de Octubre de 2009, mrbana...@googlemail.com escribió: > > > Hi, > > > > be

Re: How to use "flash" in activescaffold?

2009-10-20 Thread mrbana...@googlemail.com
Hi, before_create_save is nt meant to check if something is right or wrong with a record. I think intention was to give an option to do something in addition. Therefore it s not comparable to a validation callback in activerecord, which might interupt saving process. ActiveScaffold will only sh

Re: Setting up admin in subdomain

2009-10-20 Thread mrbana...@googlemail.com
Hi, This plugin might be a good starting point: http://github.com/mbleigh/subdomain-fu -- Volker On 20 Okt., 01:02, cswebgrl wrote: > Hi, > > I was looking for documentation for ActiveScaffold on the web site, > but anything beyond the front page is missing.  Not sure why that > is... > > Sorr

Re: How to avoid "type=password" in "Create" view?

2009-10-09 Thread mrbana...@googlemail.com
Hi, that s a rails feature. Any record attribute that includes 'password' will be of type password. I think you could generate a form overwrite and build it without using the input helper of rails. -- Volker On 8 Okt., 17:43, Iñaki Baz Castillo wrote: > Hi, I've a column called "password". In

Re: Issue with default scope order clause using join option

2009-10-08 Thread mrbana...@googlemail.com
Hi, Should be fixed in head. -- Volker On Oct 7, 1:42 am, Gabriel Sobrinho wrote: > Hello, > > I found a recent ActiveScaffold issue about default scope sorting. I > have two models Category and News. Into News model, I defined: > >         default_scope :joins => :category, :order => >      

Re: Different configurations for the same model

2009-10-08 Thread mrbana...@googlemail.com
Hi, if you use head of activescaffold I would suggest creating a new controller, which inherits from your already existing one. in activescaffold config block of new controller adjust your settings. -- Volker On 6 Okt., 19:12, Manuel Morales wrote: > Is there any way to have different con

Re: search for exact match

2009-10-06 Thread mrbana...@googlemail.com
Hi, Please try config.columns[:login].search_ui = :integer -- Volker On 6 Okt., 11:11, johnnybutler7 wrote: > Ive read api for customising the search and cant seem to find the best > way to configure the search sql for exact matches. > > I have a login field(string) but in certain instances it

Re: acts_as_list

2009-10-05 Thread mrbana...@googlemail.com
Hi, There was an extension http://wiki.activescaffold.com/wiki/published/ActsAsListReorderingActionPlugin, which worked in the past. That one detects that a model uses acts_as_list and adds four record actions: top, move_up, move_down, bottom. I do not think that it will work out of the box wi

  1   2   >