[Rails] how do I call a Javascript function post-AJAX form submit?

2010-01-26 Thread ressister
Here's my simple problem. I can't call a javascript function that's included in a page after an AJAX post. I think I've encountered something similar in the past, but can't recall the solution. Here's my setup: I have a form on a webpage that submits via AJAX using JQuery and JQuery-form.

[Rails] Strategies for streamlining view code

2009-11-18 Thread ressister
I am working on a project that uses quite a bit of conditional logic to display information about groups in a list. The partial that renders the group attributes will display different info based on whether the user is a) logged in, b) the creator of the group c) a member of the group, etc. I

[Rails] Changed session store from ActiveRecord, deleted sessions table and now...

2009-10-21 Thread ressister
Is there any chance that changing the session store from ActiveRecord to cookies, and deleting the sessions table could cause performance problems with my app? Everything was running fine until I made that change (and added indexing to all my tables). Now the app jumps right into the swap and

[Rails] Merging API data and ActiveRecord data for display in the view...

2009-09-19 Thread ressister
Hi there, I’m trying to merge JSON results from an API call in with ActiveRecord results for a blended display in a view. I’d like to be able to merge the two result sets based on 'created_at' which is is common in both the ActiveRecord results and the JSON results from the API. Created_at is

[Rails] separate controller for side-bar components?

2009-03-24 Thread ressister
I'm in the process of refactoring an existing Rails app and am wondering - is it common practice to have a controller for each model that has CRUD actions? For instance, in my app I have a side bar where users can add diary entries to a side-bar, highlighting them in bulletin-board fashion

[Rails] Re: separate controller for side-bar components?

2009-03-24 Thread ressister
, 2:09 pm, Greg Donald gdon...@gmail.com wrote: On Tue, Mar 24, 2009 at 1:03 PM, ressister ressis...@gmail.com wrote: I'm in the process of refactoring an existing Rails app and am wondering - is it common practice to have a controller for each model that has CRUD actions?  For instance

[Rails] masking sub-domain in routes?

2009-02-18 Thread ressister
I have a rails app and a Mephisto CMS instance running on the same server. Currently I use the CMS to manage help articles related to the application. Mephisto runs on a sub-domain of the main domain, think articles.mydomain.com. I'd like my routes to work like this:

[Rails] grabbing date out of url path for use as param i.e. /entries/01/2009

2009-01-12 Thread ressister
Hi there, I have been working on what i would describe as a view selector, a DHTML drop-down menu that allows a user to view entries by criteria such as: All, Uncategorized, or by month where the user has entries. If a user select January from the drop-down, the view is refreshed and the URL

[Rails] View Question... or is it a model question?

2008-11-21 Thread ressister
I have a partial, that generates a list of categories. I'd like to use the same partial for two different scenarios where data will be coming from different models. In one case, the partial is grabbing category data directly from the Category model. In another case it's grabbing it from an

[Rails] How would you handle this?

2008-10-30 Thread ressister
Hi there, I currently have two unique sites each requiring a news section which I planned to content manage through blog software. I installed Mephisto on the the same server as the two apps, and had it running successfully, providing news to one of the two sites now in operation. I then tried

[Rails] SVN help...

2008-10-18 Thread ressister
Hi there, I have a revision, #238 which I've since made changes to and committed so I'm now on revision #240. I'm not happy with the direction that I've gone since the two commits I've made, and I want #238 to be the base. I wouldn't mind keeping #240 around, which i could just do with a local

[Rails] Re: SVN help...

2008-10-18 Thread ressister
Thanks Matt, If anyone could provide an example of the branching syntax, that would be helpful. Regards, -A On Oct 18, 4:11 pm, Matt Harrison [EMAIL PROTECTED] wrote: ressister wrote: Hi there, I have a revision, #238 which I've since made changes to and committed so I'm now on revision

[Rails] Re: SVN help...

2008-10-18 Thread ressister
Alright, figured it out. Thanks again Matt for your guidance. On Oct 18, 5:48 pm, ressister [EMAIL PROTECTED] wrote: Thanks Matt, If anyone could provide an example of the branching syntax, that would be helpful. Regards, -A On Oct 18, 4:11 pm, Matt Harrison [EMAIL PROTECTED] wrote

[Rails] Re: Last piece of the pie! javascript no longer works after page.replace_html

2008-10-10 Thread ressister
handlers etc? Can you give me an example of how to do that? I'm happy to post my drag-and-drop javascript code if that will help. Thanks Fred, -A On Oct 10, 11:19 am, Frederick Cheung [EMAIL PROTECTED] wrote: On Oct 10, 4:12 pm, ressister [EMAIL PROTECTED] wrote: Hi there, I have one last

[Rails] Re: Last piece of the pie! javascript no longer works after page.replace_html

2008-10-10 Thread ressister
= initiateDragDrop() to my form_remote_tag expecting that the drag and drop would work after I posted the form, but it didn't. What am i doing wrong? Thanks, -A On Oct 10, 12:25 pm, Frederick Cheung [EMAIL PROTECTED] wrote: On Oct 10, 4:34 pm, ressister [EMAIL PROTECTED] wrote: Good point.  Right

[Rails] Re: Grouping data for charting

2008-10-02 Thread ressister
entries where id not in (select entry_id from entry_categories)') HTH, -Roy -Original Message- From: rubyonrails-talk@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ressister Sent: Thursday, October 02, 2008 11:58 AM To: Ruby on Rails: Talk Subject: [Rails] Grouping

[Rails] scriptaculous drag-and-drop and fixed position drop_receiving_elements

2008-09-30 Thread ressister
I've got to imagine someone's run into this problem before, though I can't seem to find a good explanation on how to fix it. Any guidance would be greatly appreciated... I have a fixed position div with category names in a column on the left in my app. In the main body are entries, which a

[Rails] Regular Expression pattern matching question...

2008-09-24 Thread ressister
Hi there, I'm trying to split a string using RegExp to extract a price from it. The price may or may not have a dollar sign in front of it and may or may not contain a decimal value. Below are some string examples of what the regular expression would need to handle to split out the price:

[Rails] Re: Model association help...

2008-09-23 Thread ressister
query. Using :include in finders will modify the structure of your SQL query. So you have to refer to table names in conditions like this: :conditions = ['users.user_id = 1'] On Tue, Sep 23, 2008 at 2:00 PM, ressister [EMAIL PROTECTED] wrote: I'm having trouble with three models

[Rails] Re: Model association help...

2008-09-23 Thread ressister
Right Heimdull, thanks. So my model setup is correct for what I'm trying to achieve you think? Any idea why this works: @first = Entry.find(:first, :include = :category) @first.category.name ...and this does not? @entries = Entry.sum(:price, :include = :category, :conditions = ['user_id =