Re: [Rails] ACTIVE RECORD ASSOCIATIONS TIPS AND TRICKS

2012-04-16 Thread Abram
THX On Tue, Apr 17, 2012 at 4:49 PM, vishal singh wrote: > excellent blog. > > > On Mon, Apr 16, 2012 at 12:55 PM, Vanita Kothari > wrote: >> >> Hi, >> >> Here is an interesting and informative blog that might be very useful >> for ROR professionals. Hope people can take advantage of thi

[Rails] Re: Rails Query Pulling Inaccurate Results

2012-04-16 Thread Juan Pablo Avello
El lunes, 16 de abril de 2012 23:43:44 UTC+2, yellowreign escribió: > > m running Rails 3.0.7, Ruby 1.9.2, and mySQL (local and remote). I have a > query which is pulling in records that I don't understand. The purpose of > the query is to total points that users receive from customer jobs they

Re: [Rails] ACTIVE RECORD ASSOCIATIONS TIPS AND TRICKS

2012-04-16 Thread vishal singh
excellent blog. On Mon, Apr 16, 2012 at 12:55 PM, Vanita Kothari < van...@idyllic-software.com> wrote: > Hi, > > Here is an interesting and informative blog that might be very useful > for ROR professionals. Hope people can take advantage of this > information via your forum. > > > http:/

[Rails] ACTIVE RECORD ASSOCIATIONS TIPS AND TRICKS

2012-04-16 Thread Vanita Kothari
Hi, Here is an interesting and informative blog that might be very useful for ROR professionals. Hope people can take advantage of this information via your forum. http://www.idyllic-software.com/blog/active-record-associations-tips-and-tricks/ Cheers! -- You received this message because you

[Rails] Same controller, two contexts return different request headers

2012-04-16 Thread Jarod Watkins
Hello, I have one controller that has two routes. One is a "direct" route and the other is a nested resource under another object. The two URLs are: http://example.com/controller http://example.com/nested/controller I have an AJAX form that submits data to a method via the GET method and then ren

[Rails] ActiveRecord with different Date/Time format

2012-04-16 Thread Amit Patel
I have an application where user sets his/her preferred date/time format. User is expected to enter datetime in his preferred format across the application. Now the problem is for few formats the datetime is parsed wrongly while create/update ActiveRecord. For example user has set date/time format

[Rails] Rails Query Pulling Inaccurate Results

2012-04-16 Thread yellowreign
m running Rails 3.0.7, Ruby 1.9.2, and mySQL (local and remote). I have a query which is pulling in records that I don't understand. The purpose of the query is to total points that users receive from customer jobs they complete. Models: user, customer, activity Two weird things seem to happ

[Rails] Re: syntax error, unexpected tDOT3, expecting $end

2012-04-16 Thread Brian mr
Hi Matt, I can't access the full rakefile at http://aardvark-cms.googlecode.com/svn/trunk/build/rakefile.rb do you know hoe to access it? Brent -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group

[Rails] Re: syntax error, unexpected tDOT3, expecting $end

2012-04-16 Thread Brian mr
Matt Jones wrote in post #1056520: > On Friday, 13 April 2012 16:09:44 UTC-4, Ruby-Forum.com User wrote: >> === >> require "rexml/document" >> ... >> > > This is not valid Ruby syntax - the author of the post you've sourced it

[Rails] Webrat installed but not working.

2012-04-16 Thread Arturo Bonechi
Hello, I am following the Ruby on Rails Tutorial (http://ruby.railstutorial.org/) and i can't run the integration tests using webrat (visit and click_link method for example). However, I am using the default Test::Unit rather than RSpec but I don't think that is an issue. I have the following err

[Rails] Re: Mass Assigment in simple assossiation

2012-04-16 Thread Miguel A.
> The problem lies here I think, it should possibly be fields_for > :facility do ... Apologies for the new thread. It now shows up in the form, the problem now is when I submit, it gives out an error. If i change to what you suggested, the same error apears, but for the @facility ActiveModel::Ma

[Rails] Re: Damn associations

2012-04-16 Thread Miguel A.
> Your :new action in your controller probably needs a > "@hotel.build_facility" Apologies for the new thread. If i change to what you suggested, the same error apears, but for the @facility ActiveModel::MassAssignmentSecurity::Error in HotelsController#create Can't mass-assign protected attri

Re: [Rails] how to use frame

2012-04-16 Thread Walter Lee Davis
On Apr 16, 2012, at 3:29 AM, CC Chen wrote: > Hi all, > > > I used below and want to let web interface can separate by html frame. > > But it always can't work. > > > ../views/accounts/new.html.erb > > > > > > > > > > I also try use 'good.html' and 'good2.html' to replace src, but

Re: Re[2]: [Rails] REST in Rails: A Frustration

2012-04-16 Thread Walter Lee Davis
On Apr 15, 2012, at 10:30 PM, Ralph Shnelvar wrote: > Walter, > > Sunday, April 15, 2012, 7:02:36 PM, you wrote: > > > WLD> On Apr 15, 2012, at 12:10 PM, Ralph Shnelvar wrote: > >>> Back in 2007 Leonard Richardson & Sam Ruby wrote a book called *RESTFUL Web >>> Services* (O’Reilley Media Inc

Re: [Rails] ActiveModel::MassAssignmentSecurity::Error

2012-04-16 Thread Colin Law
On 16 April 2012 11:43, Miguel A. wrote: > Newbie here, running rails 3.2.2 and ruby 1.8.7. Why have you posted this again rather than continuing the previous thread where I suggested a change to the view? Please respond on the previous thread. If the change I suggested did not help then say so.

[Rails] ActiveModel::MassAssignmentSecurity::Error

2012-04-16 Thread Miguel A.
Newbie here, running rails 3.2.2 and ruby 1.8.7. I have 2 models, Hotel and Facility, they both have have_one abd belongs_to with foriegn jey created correctly. The goal is, in a single form have displayed info. of both Hotel and Facility. I've seen nested forms but i always get the same error. I

Re: [Rails] ajax:success seems not respond.

2012-04-16 Thread Mauro
On 15 April 2012 19:00, Mauro wrote: > On 15 April 2012 15:33, Paul wrote: >> Just a wild guess, but are you returning valid json from the server? >> I've seen that when I have a syntax error in my returned json. > > Sorry for my ignorance. > I simply run create method from document_template_sess

[Rails] Re: How do I set up personalize

2012-04-16 Thread Taiwan Vincent
Hi Colin, Many thanks for reply, i am working on it right now. On Apr 16, 3:45 pm, Colin Law wrote: > On 16 April 2012 08:25, Taiwan Vincent > > wrote: > > How do I set up a personalization option? > > > I use devise, and like the user can set up personal option for > > website, for example use

Re: [Rails] How do I set up personalize

2012-04-16 Thread Colin Law
On 16 April 2012 08:25, Taiwan Vincent wrote: > How do I set up a personalization option? > > I use devise, and like the user can set up personal option for > website, for example user can set up how many items to display per > page, and every time users login, user will see the option work. Stor

Re: [Rails] Mass Assigment in simple assossiation

2012-04-16 Thread Colin Law
On 15 April 2012 23:10, Miguel A. wrote: > I posted a questionnot long ago, yet I still cannot get pass this simple > issue. > > Begginer Running rails 3.2.2, Ruby 1.8.7 > > I have 2 models, a Hotel (created by scaffolding) and Facility (with > empty controller). I am able to set the 1-to-1 associ

[Rails] how to use frame

2012-04-16 Thread CC Chen
Hi all, I used below and want to let web interface can separate by html frame. But it always can't work. ../views/accounts/new.html.erb I also try use 'good.html' and 'good2.html' to replace src, but it still could not work. how to use the frame on rails ?? Thanks, -- Poste

[Rails] How do I set up personalize

2012-04-16 Thread Taiwan Vincent
How do I set up a personalization option? I use devise, and like the user can set up personal option for website, for example user can set up how many items to display per page, and every time users login, user will see the option work. How do I do that? -- You received this message because you