Re: [Rails] Re: will_change!

2012-06-29 Thread Colin Law
On 29 June 2012 03:03, kengsreng tang li...@ruby-forum.com wrote: For example: i have model Person Class Person  id: 1  name: test end this code: Person.name_will_change! why we need to put that above line of code? I think these probably cover it.

[Rails] retry problem

2012-06-29 Thread Gurdipe Dosanjh
hi I am trying to update the following method as the retry we have hard coded to ensure the sql transaction retires three times does not work. When we get a failure it rolls back but does not retry. Is there another I can add a retry or correct the following code Gurdipe def export_data(

[Rails] Re: Update XML file from another XML file

2012-06-29 Thread David Shaw
Hi Paul, I read your post this morning as I'm setting out to achieve exactly the same objective - updating Shopify with inventory levels from a remote XML (wholesale) feed. I've got a ROR Shopify app up and running so am set with the authentication side. Would be really keen to hear how you

[Rails] installing gems on

2012-06-29 Thread Gurdipe Dosanjh
Hi I am working in a linux ruby rails environment and would like to install some gems but ensure that i they only work within my branch of the code and are not put into the gem path so that they are visible to everyone else How can I do this? my current gem env is [ta84@ukird135

Re: [Rails] installing gems on

2012-06-29 Thread Colin Law
On 29 June 2012 09:42, Gurdipe Dosanjh rhomobilea...@gmail.com wrote: Hi I am working in a linux ruby rails environment and would like to install some gems but ensure that i they only work within my branch of the code and are not put into the gem path so that they are visible to everyone else

[Rails] Re: explanation required on def method = (.)

2012-06-29 Thread Han Wu
please try http://ruby.railstutorial.org 在 2012年6月27日星期三UTC-7下午12时50分52秒,Ruby-Forum.com User写道: thanks for the link, i've bought some RoR books to get further info, but if you have some websites with some easy to use examples for a beginner am most welcome to accept them :) -- Posted

[Rails] Ruby On Rails Loco Team?

2012-06-29 Thread Oussama Issaoui
I've been thinking to build a local team for Tunisians Rails developers, and I'm wondering if there are officials loco teams for Ruby On Rails? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on the web visit

[Rails] Default scope on associations

2012-06-29 Thread venkata reddy
Hi all, Recently i am upgrading one of my rails app to 3.2.6. It seems the dafault_scope with options has been deprecated. i have a scope like this default_scope :include = [:campaign, :site], :order = :'sites.name' in a relational model campaign_site which giving this error

[Rails] Re: will_change!

2012-06-29 Thread kengsreng tang
Hi Colin Law it's very good explanation! thank very much !!! -- 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 post to this group, send email to rubyonrails-talk@googlegroups.com. To

Re: [Rails] Default scope on associations

2012-06-29 Thread Sam Serpoosh
Perception 1: I'm not sure but according to the Sql Query that you put here it seems that there's a table in your application database called campaign_sites not sites (or maybe you have another table sites which can't be perceived from this report here or you're doing kind of an aliasing or

[Rails] Re: Best practice on Javascript and rails

2012-06-29 Thread pepe
This might not be what you're looking for but I'd start by reading up on the Asset Pipeline http://guides.rubyonrails.org/asset_pipeline.html. Then there are useful railscasts http://railscasts.com/ on both subjects. On Thursday, June 28, 2012 8:03:40 AM UTC-4, Ruby-Forum.com User wrote: Hi,

Re: [Rails] Activeresource locking

2012-06-29 Thread Walter Lee Davis
On Jun 28, 2012, at 9:38 PM, narayana perla wrote: Hi, I have a scenario where a row in a DB can be updated by multiple activeresource clients. Is there a way to lock a row in active resource ? Have you read this? http://www.engineyard.com/blog/2011/a-guide-to-optimistic-locking/ Walter

[Rails] Re: Fastest way to find the total length of your postgres query

2012-06-29 Thread Frederick Cheung
On Jun 29, 4:25 am, Tom Choi li...@ruby-forum.com wrote: Hello, I know in ruby that when you want to find the size of your query say [1,2,3,4,5,6] would provide 6 as the total size, length, or even count. When I try to use size, length, or count on my application, I would get a pretty

[Rails] Re: Best practice on Javascript and rails

2012-06-29 Thread Frederick Cheung
On Jun 28, 1:03 pm, Michael Baldock li...@ruby-forum.com wrote: Hi, I get constantly nervy whenever trying to implement any javascript / jquery in rails, basically because I'm not sure where to put things in the project! I know the people at rails have thought long and hard about how to

[Rails] edit a collection item in _form for the parent

2012-06-29 Thread sheamus
Say I have a Dog that has_may legs (In this case we don't care how many). In the _form for Dog, I would like to assign a pre-existing let to him. I would like to do something like this: %= f.collection_select :leg_1, Leg.select { |l| l.dog_id == nil }, :id, :description % %=

[Rails] Re: Activeresource locking

2012-06-29 Thread narayana perla
Thanks alot for the pointer :) -- 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 post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email

[Rails] Dropdown menus

2012-06-29 Thread Eastside Developer
Environment: Rails 3.2.3 This is my first attempt at doing a dropdown menu in a Rails application. I tried looking for help on the topic, but what complicated things is that the term dropdown menu is used for actual dropdown menu (page menu), as well as what is dropdown lists, form options, form

[Rails] Prob with updating a record with Activeresource object

2012-06-29 Thread narayana perla
Hi, I am updating a record using activeresource object. I get an error cant mass assign protected attributes id, created_at , updated_at. This is because i read a record, modify some values and then update the entry using object.save( which also updates id, created_at etc). To remove this error i

[Rails] Rspec - want to NOT clear database between tests

2012-06-29 Thread Carilda Thomas
Rails 3.2.1 Ruby 1.9.3p125 Rspec 2.8.0 I have a utility written in ruby that executes within a Rails environment. It creates database records in one table based on the info in other tables. A date and a name determine uniqueness of these created records. To test this, I have to run the utility

Re: [Rails] jquery not working in production?

2012-06-29 Thread Vell
On Wednesday, June 27, 2012 12:54:41 PM UTC-4, Ylan wrote: On Jun 27, 2012, at 9:42 AM, Vell wrote: The error you are getting means that, when running the rake task the jquery gem is not available. There are a few ways this can happen: Did you add the jquery gem only in the