[Rails] is it possible to render a modal dialog box from the server?

2009-04-14 Thread yber...@msn.com
I have a before filter that authorizes a user's credentials before giving them access to any protected methods (pretty standard practice). If they fail authorization, I want to direct them to a chance to login or to create an account (also pretty standard practice). Here's the rub: I want to

[Rails] warning users that the site is coming down for maintenance

2009-02-27 Thread yber...@msn.com
Hi. I have a site that is currently running in alpha mode. I have warned my users that it will be bouncing up and down as I deploy updates. That said, i'd like to broadcast a real time warning to them when I am about to do so. Something along the lines of: The site will be brought down for

[Rails] Re: fields_for and Conflicting types for parameter containers. Expected an instance of Hash but found an instance of Array.

2009-02-18 Thread yber...@msn.com
to find a 'convention' for this. Thanks always for your generous support! Yoram On Feb 18, 12:17 am, Frederick Cheung frederick.che...@gmail.com wrote: On Feb 18, 5:38 am, yber...@msn.com yber...@msn.com wrote: When my controller passes the view an existing object, I submit the form

[Rails] Re: fields_for and Conflicting types for parameter containers. Expected an instance of Hash but found an instance of Array.

2009-02-18 Thread yber...@msn.com
, at 13:29, yber...@msn.com wrote: On the other hand, I could use 'form_for' which generates the same params hash format for both cases (existing and new object) but does not include an id. In this case, I would have the controller pass the view an instance variable: @record_id = 'foo

[Rails] fields_for and Conflicting types for parameter containers. Expected an instance of Hash but found an instance of Array.

2009-02-17 Thread yber...@msn.com
I'm trying to use 'fields_for' in a form. I want the same form to support both the creation of new obejcts as well as the editing of old ones. So - in my controller, sometimes I will pass to the form an object that already exists in my database and has an id and other times I will pass it a newly

[Rails] forms that mix new and old records

2009-02-09 Thread yber...@msn.com
I'm trying to create a form/view that displays a mix of records that exist in the database and records that the user is working on but that don't yet exist in the database. I want to leverage all of rails' nice form helpers, especially the params hash that it generates for the records when the

[Rails] Re: forms that mix new and old records - read this first please.

2009-02-09 Thread yber...@msn.com
, yber...@msn.com yber...@msn.com wrote: I'm trying to create a form/view that displays a mix of records that exist in the database and records that the user is working on but that don't yet exist in the database. I want to leverage all of rails' nice form helpers, especially the params hash

[Rails] Re: forms that mix new and old records - read this first please.

2009-02-09 Thread yber...@msn.com
...@agileconsultingllc.com wrote: On Feb 9, 2009, at 9:58 AM, yber...@msn.com wrote: they did in my first implementation, but - i ended up changing it as follows: when i first present the form, i find the highest id of the preexisting record, i store that in '@last_existing_id'. then render

[Rails] what is calling ApplicationController#index

2009-01-19 Thread yber...@msn.com
I'm probably missing something very obvious here, but - I just started noticing error messages from my log, of the form: ActionController::RoutingError (No route matches /bullet.gif with {:method=:get}): These immediately follow: Processing ApplicationController#index (for 127.0.0.1 at