[Rails] Re: Run "generator destroy", now git is telling me I have missing files. How do I best deal with this?

2014-01-31 Thread Melvin Ram
Use 'git add -u' or add the specific files you've removed ex. 'git add app/removed_file.rb' On Friday, January 31, 2014 8:56:51 AM UTC-6, Bizt wrote: > > Hi, > > In rails I run "rails generator destroy..." for my controllers and models. > When I "git add . " files and commit changes, git tells m

[Rails] how to use single login page for users in four models

2013-07-05 Thread ram kris
how to use single login page for users in four models -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra

[Rails] Virtual attributes in Rails

2013-05-08 Thread sri ram
What do you knew about virtual attriburtes in rails ? Generally we can get idea about attr_accessible and attr_accessor so what these two can do . i found the difference between these two from this blog. Very useful plz check it http://mywayonrails.wordpress.com/2013/04/01/virtual-attributes-

[Rails] Auto refresh the drop-down

2012-10-09 Thread Ram
It never updates the dropdown list. Suggest me a way to auto refresh only the current dropdown with the new vales in db when a new value is added. Ram -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,

[Rails] Installed RVM-Ruby-Rails NOT available after closing terminal window!!

2012-05-29 Thread Ram Ayyalaraju
aried. Any comments/help appreciated. I'm using Ubuntu Linux 11.04. Regards, Ram -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from

[Rails] Re: Cache data set on the server

2011-02-23 Thread Ram Kumar
send requests to the server. Rake tasks seems to be a much better way. I will explore that too. Once again thanks for your help in pointing me in the right direction. Ram. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups &quo

[Rails] Cache data set on the server

2011-02-22 Thread Ram Kumar
Hi, I am new to Rails and I am building a rails server which acts as the backend for a mobile app. I have certain daemon processes that fetch and store data in a database. Every time someone makes a request for data from the phone, I will have to send him the same dataset irrespective of who is re

[Rails] Update: buildr Windows 7 64 bit problems

2010-12-24 Thread Ram
Further information on my current ruby and rails installation that might be helpful to a generous Ruby saint: C:\>rails -v Rails 2.3.2 C:\Users\Ram>buildr -v Buildr 1.3.3 C:\>ruby -v ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32] C:\shiftrx\backend>buildr clean deploy C:

[Rails] buildr Windows 7 64 bit problems

2010-12-24 Thread Ram
iated. I know I am a little short on details, but part of that is due to the fact that I have tried many different permutations of different approaches without success. Merry Christmas, Ram -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&

[Rails] Re: Using Ajax (Prototype) to Update Form fields + Resulting page Simultaneously

2010-10-13 Thread Ram
Hi Bazz, You can try having a hidden edit form for the model on the same page, say with the div id of "form". On clicking the "Edit Details" link, use JS to hide the current div and display the "form" div instead. This div will have the complete form which will submit via AJAX. This is if you woul

[Rails] dynamically changing ActionMailer::Base.delivery_method

2010-09-08 Thread Ram
Hi all, I need some of my emails to go out using "smtp" and some others using "sendmail" . Is there a clean way to switch between these two deliver methods depending upon the mailer method? Thanks! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Tal

[Rails] Re: Ruby - return true if any element in Array satisfies condition but false otherwise

2010-07-18 Thread Ram
Perfect! :) thanks! Couldn't find docs on this though. On Jul 16, 7:07 pm, Frederick Cheung wrote: > On Jul 16, 1:48 pm, Ram wrote: > > > Hi, > > > ARubyquestion. > > > Anyone know a function that loops through anarrayand returns true if > > any oneeleme

[Rails] Re: Hash or not a Hash?!

2010-07-16 Thread Ram
> :x=>"new_x" Here x is the key and "new_x" is the value. > :y=>{:x=>X.new} Here y is the key and another hash, {:x => X.new}, is the value. And within this hash again, x is the key and X.new is the value. -- You received this message because you are subscribed to the Google Groups "Ruby on

[Rails] Re: named_scope multiple conditions

2010-07-16 Thread Ram
You might want to split those two into named_scopes of their own though - for more modularity and possible scope chaining opportunities elsewhere in the code. Handling whether one of those arguments, which I presume are user entered, is blank can be handled in the controller. On Jul 16, 5:32 pm, J

[Rails] Ruby - return true if any element in Array satisfies condition but false otherwise

2010-07-16 Thread Ram
Hi, A Ruby question. Anyone know a function that loops through an array and returns true if any one element satisfies the condition but false if none satisfy the condition? And it should do this in one line. Something like any_bot_follower = followers.each {|f| return true if f.bot?} The above

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-07-06 Thread Ram
ow-Koser wrote: > Ram wrote: > > Okay ... RESOLVED! :D > > > I left themysqlinstallation as such in /usr/local . > > I had been running the ruby and rails shipped with leopard in /usr/ > > bin. > > Followed the hivelogic article (http://hivelogic.com/articles/ruby-

[Rails] Re: mysql gem recognized by script/server but not rake

2010-07-05 Thread Ram
On Jul 4, 10:02 pm, Frederick Cheung wrote: > On Jul 4, 11:03 am, Ram wrote:> Hi all, > > > I recently installed the rubymysqlgem (2.8.1) on my Mac Leopard > > after much trouble (http://groups.google.com/group/rubyonrails-talk/ > > browse_thread/thread/586c29ca813

[Rails] mysql gem recognized by script/server but not rake

2010-07-04 Thread Ram
gems/custom_require.rb:31:in `gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' /Users/ram/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/ dependencies.rb:156:in `require' ... Anybody got any idea why this is happening and how I can fix it? Thanks

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-28 Thread Ram
;sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql" . Worked like a charm! Thank you all for the help! :) On Jun 17, 9:15 pm, Ram wrote: > :) I do. And no, not a dumb question. Im happy answering *any* > question if it means you can help me fix this hair-loss-causing > issue!

[Rails] Re: Installing MySQL gem on Mac OS X Leopard for Rails 2.3.5

2010-06-28 Thread Ram
mysql" . Worked like a charm! Thank you all for the help! On Jun 25, 4:03 pm, "Jonathan C." wrote: > Hi Ram, > > http://hivelogic.com/articles/ruby-rails-leopardandhttp://hivelogic.com/articles/installing-mysql-on-mac-os-x > > :D -- You received this message because you

[Rails] Re: Installing MySQL gem on Mac OS X Leopard for Rails 2.3.5

2010-06-25 Thread Ram
 # ruby ./install.rb > > On Jun 8, 4:21 am, Ram wrote: > > > > > Anyone? > > > On Jun 6, 4:28 pm, Ram wrote: > > > > Hi, > > > > Ive gotMacOS10.5.8 andMySQL5.0.67-osx10.5-x86 (installed in /usr/ > > > local/mysql) working fine with my

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-17 Thread Ram
:) I do. And no, not a dumb question. Im happy answering *any* question if it means you can help me fix this hair-loss-causing issue!!! On Jun 17, 5:21 pm, Frederick Cheung wrote: > On Jun 17, 9:58 am, Ram wrote: > > > Hello Fred, > > > I can see the following errors in the

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-17 Thread Ram
no") 5. ld: library not found for -lsocket (Under "have_library: checking for main() in -lsocket... no") Hope that helps. Thanks! On Jun 17, 1:37 pm, Frederick Cheung wrote: > On Jun 16, 12:07 pm, Ram wrote: > > > :S > > > Im not comfort

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-16 Thread Ram
Im not re-installing the mysql gem. I have been using the Ruby based mysql library that used to ship with Rails by default (pre 2.2). If I am to migrate to Rails 2.3 then I HAVE to install the gem now. On Jun 16, 8:58 pm, Hassan Schroeder wrote: > On Tue, Jun 15, 2010 at 1:41 AM, Ram wr

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-16 Thread Ram
:S Im not comfortable uninstalling everything and installing it from scratch again. Dont want to lose my existing setup. Pointers from anyone at all? On Jun 15, 1:52 pm, Ram wrote: > I also get this warning in the very beginning of the gem install. Does > it have any relevance? >

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-15 Thread Ram
I also get this warning in the very beginning of the gem install. Does it have any relevance? WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin aren't both writable. WARNING: You don't have /Users/Ram/.gem/ruby/1.8/bin in your PATH, gem execut

[Rails] mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-15 Thread Ram
Hello all, Ive got Mac OS X Leopard (10.5.8), ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0] and mysql 5.0.67 installed and working fine with Rails 2.1.0. "which ruby" outputs /usr/bin/ruby. I can see the mysql symlink in / usr/local/mysql. I can also see the mysql-5.0.67-osx10.5-x8

[Rails] Re: Installing MySQL gem on Mac OS X Leopard for Rails 2.3.5

2010-06-08 Thread Ram
Anyone? On Jun 6, 4:28 pm, Ram wrote: > Hi, > > Ive gotMacOS10.5.8 andMySQL5.0.67-osx10.5-x86 (installed in /usr/ > local/mysql) working fine with my Rails 2.1.0 applications. > > Im trying a test run of Rails 2.3.5 and having to install theMySQLgemis > literally driving me

[Rails] Installing MySQL gem on Mac OS X Leopard for Rails 2.3.5

2010-06-06 Thread Ram
Hi, Ive got Mac OS 10.5.8 and MySQL 5.0.67-osx10.5-x86 (installed in /usr/ local/mysql) working fine with my Rails 2.1.0 applications. Im trying a test run of Rails 2.3.5 and having to install the MySQL gem is literally driving me crazy! Ive tried all the following commands, with sudo and without

[Rails] `test': wrong number of arguments (1 for 2) (ArgumentError)

2010-04-05 Thread Ram
Hi, Im trying to change the syntax of my tests to the test "some method" do ... end syntax from the existing def test_some_method ... end syntax. Im pasting my test code below. Im getting the error in the subject line if I try to run the test as a ruby script from the console. require File.di

[Rails] Re: ActiveRecord::StatementInvalid: Mysql::Error: Lock wait timeout exceeded

2010-03-17 Thread Ram
find anything. However, given that Im not logging the db connection times, I doubt I'll be able to point a finger at any one such query. This seems to be happening even when the server is under relatively low load. On Mar 17, 1:07 pm, Frederick Cheung wrote: > On Mar 17, 6:12 am, Ra

[Rails] ActiveRecord::StatementInvalid: Mysql::Error: Lock wait timeout exceeded

2010-03-16 Thread Ram
Hi all, Ive been getting this error on one particular query repeatedly for the past few days. ActiveRecord::StatementInvalid: Mysql::Error: Lock wait timeout exceeded; try restarting transaction: UPDATE `posts` SET `updated_at` = '2010-03-17 05:35:00', `view_count` = 54 WHERE `id` = 158 Googling

[Rails] Re: IE7 & IE8 Sessions and Subdomains

2010-03-03 Thread Ram
Anyone? Long shots are welcome too :) On Feb 27, 12:48 pm, Ram wrote: > Hi, > > Ive got an application that lets users dynamically generate subdomains > for the website. The problem is that inIE7and 8, when Im logged in > athttp://mywebsite.com, I get my custom 404 when I try t

[Rails] IE7 & IE8 Sessions and Subdomains

2010-02-26 Thread Ram
Hi, Ive got an application that lets users dynamically generate subdomains for the website. The problem is that in IE7 and 8, when Im logged in at http://mywebsite.com, I get my custom 404 when I try to access http://subdomain.mywebsite.com . Once I logout though, I get the expected page at http:/

[Rails] Paperclip: Adding attachment to model on update not working

2009-09-25 Thread Ram
Hi, This is a bit of a special case. Ive got a POST form for a posts model which has a preview functionality. So if the user clicks on "Preview", then the model is saved and a new window opens with the preview. And the user can keep adding content to the post and previewing before he's satisfied

[Rails] Re: Using barcode-generator's 'barcode' method in the model

2009-09-14 Thread Ram
For now, I've copied the code into the Customer model and required the imagemagick_wrapper in the model to get this to work. It works fine but is there no cleaner way? On Sep 14, 1:20 pm, Ram wrote: > Hi, > > I am using matisimitsu's barcode-generator for barcodes in PD

[Rails] Using barcode-generator's 'barcode' method in the model

2009-09-14 Thread Ram
Hi, I am using matisimitsu's barcode-generator for barcodes in PDFs with Prawn and Prawnto. http://github.com/matsimitsu/barcode-generator/tree/master. I want to use the barcode method in a model where i generate the PDF as a mail attachment, so that I can do this def with_attachment(pdfFile, c

[Rails] Re: RMagick Installation woes

2009-09-14 Thread Ram
Thanks, > Abhinav > -- > अभिनवhttp://twitter.com/abhinav > > > > On Mon, Sep 14, 2009 at 11:21 AM, Ram wrote: > > > Hi, > > > I need to install Rmagick to get re-sizing working with Paperclip. My > > dev machine is on Mac OSX Leopard and the server

[Rails] RMagick Installation woes

2009-09-13 Thread Ram
Hi, I need to install Rmagick to get re-sizing working with Paperclip. My dev machine is on Mac OSX Leopard and the server is on Ubuntu Intrepid 8.1 I dint have Macports or wget at first. I was following this article - http://onrails.org/articles/2007/11/03/installing-rmagick-on-leopard-without-

[Rails] Re: Preview a post in a new window without saving it

2009-09-11 Thread Ram
render :action => 'new' end else if @post.valid? flash[:success] = "Post successfully published" redirect_to post_path(@post) else render :action => 'new' end end end end T

[Rails] Re: Preview a post in a new window without saving it

2009-09-10 Thread Ram
ue %> > > For avoiding duplication, check in DB: if any post was saved with the > same attributes within a time range, if yes, most likely its a > duplicate (you can see more in rails space book's RESTful blog > chapter) > > Thanks, > Abhinav > > -- > अभि

[Rails] Re: Preview a post in a new window without saving it

2009-09-09 Thread Ram
n't even need to   > manage state transition formally. Just make sure when you display   > posts to get only published ones (use named_scope to make this more   > automatic). > > On Sep 9, 2009, at 10:49 PM, Ram wrote: > > > > > > > Hi, > > > I

[Rails] Preview a post in a new window without saving it

2009-09-09 Thread Ram
Hi, Ive got a form for a blog post and there are 3 buttons - Publish, Preview and Save as Draft. Clicking on Preview should open a new window with the preview of the post without saving it while the current window stays on the "New Post" form. I dont want the post to be saved because, once the u

[Rails] Re: Next page after log in

2009-09-01 Thread Ram
If you're using restful_authentication plugin, check out the method called redirect_back_or_default. Even otherwise, I think thats what you want. Its a simple short method, try getting your hands on it. On Aug 31, 7:09 pm, Ale Ds wrote: > Hi, > I have a best practice question: > > In my web apps

[Rails] Difference Between ROR and Django...

2009-08-17 Thread Ram Kumar.K
Hi I am the newbie to both Django as well as ROR Which one i have to choose as my carrier one And what is the main difference Djkango in Python & It is in Ruby.. which one is best to easy learn and about security Thank you... -- WithRegards... K.Ramkumar Blog at http://fallinlinux.wor

[Rails] Re: Holy Crap, My Rails Site is Slow

2009-08-15 Thread Ram
Good stuff. I have been following the scaling rails series and must say, very very important for Rails developers. The part about calculating the MaxClients for Apache --> It would be great if inexperienced people like me could learn from someone who would be gracious enough to explain how it can

[Rails] Re: Implementing a user activity log with STI. (?)

2009-08-12 Thread Ram
Nice. Went through a wiki article on Command Pattern. Very much the design i need. Will try to do that when I get back to the activity log :). Thanks. On Aug 13, 10:49 am, Robb wrote: > Thanks, Ram.  Yep, I realized that polymorphic associations is exactly > what I was talking about.

[Rails] Re: Implementing a user activity log with STI. (?)

2009-08-12 Thread Ram
Hi Robb, I ended up writing a very crude solution and then stopped that to revamp later. I DO believe you are on the right track though. The only part that I havent figured out though is writing neat code for the actual message or sentence the user will read. Like, You edited the task - Change t

[Rails] Re: Git, Capistrano, Passenger, and Apache Questions

2009-08-12 Thread Ram
I only read the original post and then kind of just glanced through the rest. I think articles.slicehost.com has got the best articles in getting a slice up and running with everything u need for a Rails app. Ive gone through the process twice and it took me no more than 2/3 hours. You would lov

[Rails] Re: I've decided to use Rails... (I hope I made the right decision).

2009-08-11 Thread Ram
You may have issues with RoR on your way but you'll never ever regret taking it up. And believe me, its not just the language or the framework. Its the community. one up on test-first. good luck! On Aug 11, 9:21 am, Marnen Laibow-Koser wrote: > AlwaysCharging wrote: > > I've read a ton of comp

[Rails] Re: calling a jQuery function from RJS/onclick

2009-08-10 Thread Ram
enter live(). implementing this function solved my problem. http://docs.jquery.com/Events/live#typefn On Aug 10, 9:47 am, Ram wrote: > anyone?? anything? > > On Aug 7, 4:36 pm, Ram wrote: > > > Hi, > > > I have the followingjQueryfunc

[Rails] Re: Div is shown only from the layout nowhere else

2009-08-10 Thread Ram
An instance variable @x survives only for one HTTP request. When you move from the store controller to some other controller, most likely, you're sending another HTTP request (as opposed to an AJAX request, typically) which clears out all instance variables. This clears out @cart and you dont see

[Rails] Re: calling a jQuery function from RJS/onclick

2009-08-09 Thread Ram
anyone?? anything? On Aug 7, 4:36 pm, Ram wrote: > Hi, > > I have the followingjQueryfunction on the head of my page. > > >                jQuery.noConflict(); > >                 /* calling jNice on document ready */ >                jQue

[Rails] Re: ajax file upload question

2009-08-09 Thread Ram
why do you need it outside the main form? is the main form also going to be there on that page? you might want to check out form_tag http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#M001729 good luck! On Aug 8, 9:58 pm, Me wrote: > anyone? > > On Aug 7, 3:55 pm, Me wrot

[Rails] calling a jQuery function from RJS/onclick

2009-08-07 Thread Ram
Hi, I have the following jQuery function on the head of my page. jQuery.noConflict(); /* calling jNice on document ready */ jQuery(document).ready(function($) { $('div.jNice').jNice(); }); .

[Rails] Re: Simple insert_html RJS working in FF not in Safari

2009-08-07 Thread Ram
x27;RJS error:\n\n' + e.toString()); alert(''); > throw e } > > -nirosh- > > On Aug 7, 3:16 pm, Ram wrote: > > > Hi, > > > Im trying to insert a into a table. the code is as below. > > > HTML > > - > >

[Rails] Simple insert_html RJS working in FF not in Safari

2009-08-07 Thread Ram
Hi, Im trying to insert a into a table. the code is as below. HTML - <%= render :partial => "item", :collection => @order.items %> <%= add_item_link "+" %> _item.html.erb - he

[Rails] Re: 2 onchange functions - 1 jquery, 1 prototype - not working in safari

2009-08-06 Thread Ram
; //this is the line that fails in safari but works in FF } Anything wrong with my HTML structure that Safari is rejecting? thanks. On Aug 6, 4:51 pm, Ram wrote: > Hi all, > > Im using the jNice plugin on a select box in a form of mine. Im also > calli

[Rails] 2 onchange functions - 1 jquery, 1 prototype - not working in safari

2009-08-06 Thread Ram
Hi all, Im using the jNice plugin on a select box in a form of mine. Im also calling a custom JS function which uses prototype on the same select box. <%= f.collection_select :item_name, Item.all, :item_for_order, :name, { :name => "select", :onchange => "item_row($(this));"} %> now both jNice

[Rails] Re: forms, javascript and ajax - hopefully an easy question

2009-08-05 Thread Ram
something like this? in your controller, respond_to do |format| format.js { message = @task.update_attributes(params[:task]) ? "Updated successfully" : "Update failed" render :update do |page| page.replace_html :flash_area, message

[Rails] Re: Activity Log - messages with links - Strategy?

2009-08-04 Thread Ram
morphic relationship entering the picture..? Your thoughts? Thanks, Vinay. On Aug 4, 8:17 pm, Marnen Laibow-Koser wrote: > Ram wrote: > > Nice.. that seems like a good option. So assuming that im gonna use > > link_to to generate the HTML, > > Why are you assuming that?  It m

[Rails] Re: Activity Log - messages with links - Strategy?

2009-08-03 Thread Ram
or suggestions? On Aug 3, 9:06 pm, Marnen Laibow-Koser wrote: > Ram wrote: > > Hi all, > > > Im looking to write an activity log as part of the dashboard for one > > of my apps. The log should show messages like > > > "Vinay created the project Acme Inc Websi

[Rails] Re: select helper

2009-08-03 Thread Ram
Do you still have format.html ? render :update works for me. and i cant think of a cleaner way to do this.. On Aug 3, 5:31 pm, bingo bob wrote: > a,, > > seems like its doing it multiple times.. wierd..notice the time stamps. > > never does get me to the show action though. > > Processing R

[Rails] Re: Updating attribute based on radio selection

2009-08-03 Thread Ram
this post will be useful in understanding the logic you need for this task. stars, css and the works is upto your own discretion.. http://blog.aisleten.com/2007/05/03/ajax-css-star-rating-with-acts_as_rateable/ On Aug 3, 4:58 pm, Tamilselvi Srinivasan wrote: > sorry,i have missed to paste the <

[Rails] Re: select helper

2009-08-03 Thread Ram
hmmm.. error messages? log outputs? does the Resort find sql query shoot off? from my experiments, the only workable solution is using render :update.. format.js { render :update do |page| page.redirect_to resort_path(@resort) end } but this actually sounds sil

[Rails] Activity Log - messages with links - Strategy?

2009-08-03 Thread Ram
Hi all, Im looking to write an activity log as part of the dashboard for one of my apps. The log should show messages like "Vinay created the project Acme Inc Website", "You completed 2 tasks in the project Acme Inc website" and so on. So i went about creating an activities table with control

[Rails] Re: select helper

2009-08-03 Thread Ram
; + encodeURIComponent(value)});" %> Check the dev log for debugging if you run into any problems. You can also use FF's Firebug to debug JS. On Aug 3, 1:07 pm, bingo bob wrote: > Hi Ram, > > That looks ideal. Your thinking is absolutely on the right lines in that > I'

[Rails] Re: Background daemon

2009-08-03 Thread Ram
if you had initially set it to sending every hour and then changed it to every day in between, then u may have to re-start the daemon.. did you do that? but i second Michael.. you should be using a cron for this. On Aug 3, 7:47 am, Michael Guterl wrote: > Penelope West wrote: > > It's sending e-

[Rails] Re: select helper

2009-08-02 Thread Ram
what is the "resort.id" in "resort_path(resort.id)? it has no value.. also, im not sure its a good idea to submit a form for a simple get request like this. forms and get requests, as far as i can imagine, go well together for something like a search. try something like this.. <%= select_tag(:r

[Rails] Re: How can I identify a memory leak? using memorylogic..

2009-07-29 Thread Ram
Hi Fernando, you should check your daemons/ crons/ background tasks if you have any running. try and stop them and see if things are ok. my problem was with a couple of daemons i was running. i stopped them and im running a system cron instead. took care of the hanging.. good luck! On Jul 30, 5

[Rails] Re: padawan seeks advice from jedi masters to create toggle box via ajax/rjs before slitting wrists with ruby powered light-saber.

2009-07-24 Thread Ram
s like "render :update" is not propagated > -->http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/... > > On Jul 24, 12:00 pm, Ram wrote: > > > this can be done without having to pass the current toggle status > > > the view > > <% orders.ea

[Rails] Re: padawan seeks advice from jedi masters to create toggle box via ajax/rjs before slitting wrists with ruby powered light-saber.

2009-07-24 Thread Ram
this can be done without having to pass the current toggle status the view <% orders.each do |order| %> <%= order.whatever%> <%= link_to_remote image_tag("path_to_image"), url_to_toggle_method(:id => order.id) %> <% end %> the controller def toggle @order = Order.find(params[:id]) @or

[Rails] Re: Find_all_by and find(:all) to only select certain values for a selection box

2009-07-17 Thread Ram
cascading select boxes search for that On Jul 16, 7:07 pm, Valli wrote: > alright thnx a lot!! > sur tht will help > Valli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to

[Rails] Re: expire_action confusion

2009-07-17 Thread Ram
do you have this line in the controller too? cache_sweeper => On Jul 16, 5:40 pm, phil wrote: > I just can't figure this out. > > I have this in my Players controller: > caches_action :show, :layout => false > > I have a sweeper (that is getting called) that does this: > expire_action(:control

[Rails] Cache expiration with format not working as expected

2009-07-09 Thread Ram
Hi all, In my OrdersController, I have two actions completed and incomplete that respond_to HTML and CSV. Im also action caching these actions .. caches_action :completed, :incomplete ... def completed @orders = Order.completed respond_to do |format| format.html format.csv {re

[Rails] Re: :has_one association not letting me delete parent record

2009-06-30 Thread Ram
:) done already. Works fine. On Jun 30, 4:06 pm, Colin Law wrote: > 2009/6/30 Ram : > > > > > Hmmm.. I removed the new relic agent and still had the problem. The > > query on the transactions table seems to come from orders_controller > > where I call @order.des

[Rails] Re: :has_one association not letting me delete parent record

2009-06-30 Thread Ram
t although its a keyword, its enough to change just the association name to get it to work. the model is still Transaction. On Jun 30, 1:42 pm, Colin Law wrote: > 2009/6/30 Ram : > > > > > If i do > > > Order has_one :txn, :class_name => "Transaction

[Rails] Re: :has_one association not letting me delete parent record

2009-06-30 Thread Ram
If i do Order has_one :txn, :class_name => "Transaction" things work just fine. But i still dont get how the line in New Relic's agent generates that query.. Gonna let them know.. On Jun 30, 12:58 pm, Ram wrote: > The query comes from > > vendor/plugins/newre

[Rails] Re: :has_one association not letting me delete parent record

2009-06-30 Thread Ram
The query comes from vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/ active_record_instrumentation.rb:40:in `log_without_trace_Database___adapter_nameargs_1__' New Relic's agent. hmm.. maybe not a good idea to have 'transaction' as a model name? On J

[Rails] Re: :has_one association not letting me delete parent record

2009-06-30 Thread Ram
use.. could it?.. indeed.. be.. a... BUG!!?!? Im gonna try and install the query trace plugin and trace where that query is coming from... any other ideas? On Jun 30, 12:27 pm, Colin Law wrote: > 2009/6/29 Ram : > > > > > Whats interesting is that if there is no transaction for a

[Rails] Re: :has_one association not letting me delete parent record

2009-06-29 Thread Ram
difference. I have another has_one association on the same Order model but that doesnt give me any of this pain.. i just dont get it.. On Jun 29, 11:25 am, Ram wrote: > Anyone? ideas? i really am not able to figure this out.. nothing in > the API docs, google is not being its dependable self..

[Rails] Re: :has_one association not letting me delete parent record

2009-06-28 Thread Ram
Anyone? ideas? i really am not able to figure this out.. nothing in the API docs, google is not being its dependable self.. On Jun 27, 11:58 am, Ram wrote: > Hi all, > > I have two models Order and Transaction witht he following > relationship. > > Order > has_one :tran

[Rails] :has_one association not letting me delete parent record

2009-06-26 Thread Ram
Hi all, I have two models Order and Transaction witht he following relationship. Order has_one :transaction Transaction belongs_to :order and there's an order_id column in the transactions table. These models have various associations with other models too. When i try to delete an order though

[Rails] Re: before_create return value breaking object.save: rails bug?

2009-06-14 Thread Ram
I actually ran into this same issue sometime back. n the worst part was that it took me even longer to figure out this was happening cos i was saving multiple records and some just wouldnt go into the db and i would have no idea. but i really think its a useful, and more importantly, correct featu

[Rails] Re: How can I identify a memory leak? using memorylogic..

2009-06-12 Thread Ram
As for bleakhouse, i went through it earlier and it seemed like quite a bit of setup so i put it off for later. Will do it now.. On Jun 12, 1:42 pm, Ram wrote: > Hi Fred, > > I have a few basic questions that if you could answer, would help me > get a better grasp of things. > &

[Rails] Re: How can I identify a memory leak? using memorylogic..

2009-06-12 Thread Ram
the problem at hand. Hope you can guide me here. I have little to no idea about these things and could really use an experienced one guiding me.. thanks! On Jun 12, 1:21 pm, Frederick Cheung wrote: > On Jun 12, 7:35 am, Ram wrote: > > > > > Hi all, > > > I have an

[Rails] How can I identify a memory leak? using memorylogic..

2009-06-11 Thread Ram
Hi all, I have an ROR application thats been running on the production server for almost a couple of months now. Everything seemed fine but the past few days have caused worry. The whole server slows down drastically and comes to a halt suddenly and it requires a reboot for the apps i have on the

[Rails] Re: Application hanging in production! New Relic Phy Mem Utilization Haywire! Help!

2009-06-11 Thread Ram
initial analysis. Any more ideas? - Hide quoted text - On Thu, Jun 11, 2009 at 5:26 PM, blasterpal wrote: > > Ram, > > I've gotten burned recently with production issues not related to > yours. But I only want to add the following. Rollback your changes and > see if the probl

[Rails] Application hanging in production! New Relic Phy Mem Utilization Haywire! Help!

2009-06-11 Thread Ram
Hi all, My app was doing fairly well in production past couple a months. But past 2 days, its gone off its rocker! Not able to figure out what the problem is. The symptoms are as follows.. - It first went down when I deployed and ran a migration yesterday. A simple column addition to a table - T

[Rails] Re: Storing search value in database

2009-06-09 Thread Ram
http://railscasts.com/episodes/37 --- Simple Search form http://railscasts.com/episodes/111 --- Advanced Search On Jun 9, 4:30 pm, Remco Swoany wrote: > Hi, > > We got a search form (with autocomplete) for airlinetickets. The idea is > that we want to store the search query of all our visitors

[Rails] Re: Daemons causing Mysql::Error:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

2009-06-01 Thread Ram
Sometimes, I also get a Passenger::Railz::ApplicationSpawner::Error. Any ideas on what might be going wrong? Tried "ActiveRecord::Base.connection.reconnect! " in the daemons but that dint help. On Jun 1, 11:42 am, Ram wrote: > Hi all, > > Ive been having this problem for the p

[Rails] Re: Can't get around this Routing Error

2009-06-01 Thread Ram
What does the partial contain? have u given @listhub any value for this action that its failing in? On Jun 1, 3:37 am, Frederick Cheung wrote: > On May 31, 10:45 pm, Jay Covington > wrote: > > > > > Hi All, > > > I'm currently stuck trying to get a scaffold routed correctly. The line > > of cod

[Rails] Daemons causing Mysql::Error:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

2009-06-01 Thread Ram
Hi all, Ive been having this problem for the past few days on production. I have a couple of daemons (using the daemons gem and daemon_generator) that I run every hour on the server. One of them sends out email too (just in case thats relevant information). Besides this, I have 4 Rails apps runni

[Rails] Re: Nested forms

2009-05-19 Thread melvin ram
7;t a real solution to this bug yet. On May 19, 11:33 pm, Jason Pfeifer wrote: > Melvin Ram wrote: > >http://pastie.org/private/ju5htjk8kqjdqik94br0nw > > > Line 11 in this pastie is causing errors. errors are including in > > pastie. I was basing this on the exampl

[Rails] Nested forms

2009-05-19 Thread mel ram
http://pastie.org/private/ju5htjk8kqjdqik94br0nw Line 11 in this pastie is causing errors. errors are including in pastie. I was basing this on the example on http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes ... any ideas on what I'm doing wrong? --~--~-~

[Rails] Adding Subdomain_fu's 'current_subdomain' method to models

2009-05-18 Thread Ram
Hi, I have a view in which i have the following collection_select <%= f.collection_select :category_id, current_account.categories.find (:all), :id, :name, {:prompt => "-Select-", :include_blank => true} %> and the current_account method in authentication.rb is def current_account @current

[Rails] Re: Custom JS breaking in IE6,7 - Tips on debugging?

2009-05-15 Thread Ram
Resulting HTML page source Filter Tickets Filter tickets by status. Open Accepted In Progress Completed All Invalid HELP! On May 15, 3:41 pm, Ram wrote: > Hi all, > >

[Rails] Custom JS breaking in IE6,7 - Tips on debugging?

2009-05-15 Thread Ram
Hi all, I just got around to testing my application in IE6 and 7 and I discovered that my custom Javascripts dont work and seem to break the HTML and CSS in the page too. Any tips or resources that I can read up to make my JS IE compatible? Your experiences and thoughts? I coudl post some of my

[Rails] Re: daemons load activesupport 2.2.2 instead of 2.1.0, causing failure

2009-05-11 Thread Ram
on is called reminders_ctl and the log/reminders.rb.log is the log file im looking into. How do I make it o/p to this log file so that I can monitor the daemons progress from this one file? On May 11, 2:07 pm, Ram wrote: > Hi Fred, > > I did read about this solution elsewhere before s

[Rails] Re: including a blank in a dropdown

2009-05-11 Thread Ram
Read up on form_tag api.rubyonrails.org/classes/ActionView/Helpers/ FormTagHelper.html Fix your form accordingly. Once you have done that, and once u have the select box looking as you want it, choose a location and hit submit. Check the development log for the parameters hash and dump it here.

  1   2   >