[Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-30 Thread Rafael Adel
Are you sure about this ? If so, is there a way to make it working without changing table names ? On Thursday, April 30, 2015 at 3:45:46 AM UTC+3, Chris Lerum wrote: In short, yes. See this lovely article; notice the conspicuous absence of any talk of changing table names:

[Rails] Good tutorials to start with Rails 4

2015-04-30 Thread suraj jana
Hello everyone!! I am new to Ruby on Rails. Can anyone please lead me to few good tutorials to start with Rails 4. Thank you, -- 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

Re: [Rails] More than one button with custom actions inside new.html.erb

2015-04-30 Thread Colin Law
On 30 April 2015 at 01:03, Padmahas Bn padma...@gmail.com wrote: ... But the second button is not working but throwing an error message No route matches {:action=deduction, :class=btn btn-primary, :controller=recoveries, :method=post} Now how can I call custom action deduction written

[Rails] button_to for custom action not working.

2015-04-30 Thread Padmahas Bn
First thing is I'm no using form_for or any other form tags. I have *a Model* class Modelname ActiveRecord::Base def self.methodfirst #Class method : # Some code : end def methodsecond #Instance method : # Some code : end end *a controller* class

[Rails] Re: Good tutorials to start with Rails 4

2015-04-30 Thread Rafael Adel
This is an amazing one https://www.railstutorial.org/ On Thursday, April 30, 2015 at 12:21:09 PM UTC+3, suraj jana wrote: Hello everyone!! I am new to Ruby on Rails. Can anyone please lead me to few good tutorials to start with Rails 4. Thank you, -- You received this message

[Rails] Re: How to create a nested signup form?

2015-04-30 Thread Elizabeth McGurty
I think the model for your form should be @member, the last object in your controller def new On Wednesday, April 29, 2015 at 5:15:28 PM UTC-4, nic...@gmail.com wrote: I have two models each with their own resources: Organizations and Members. An organization has multiple members and a

[Rails] Re: How to create a nested signup form?

2015-04-30 Thread nickk40
An update: In the new view it turned out I needed %= f.fields_for :member*s* do |p| % So plural members. Similar, in the params in the controller I changed member_attributes to members_attributes, again the plural form. Also, in def create in the organizations controller, I removed the line:

Re: [Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-30 Thread chris lerum
you could try, in the model, self.table_name = seven_gallery_photos etc. On Thu, Apr 30, 2015 at 4:09 AM, Rafael Adel rafael.ade...@gmail.com wrote: Are you sure about this ? If so, is there a way to make it working without changing table names ? On Thursday, April 30, 2015 at 3:45:46 AM

Re: [Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-30 Thread Chris Lerum
https://github.com/chrislerum/factory setting table_name seems to be the sweet spot, working now On Thursday, April 30, 2015 at 8:01:49 AM UTC-4, Chris Lerum wrote: you could try, in the model, self.table_name = seven_gallery_photos etc. On Thu, Apr 30, 2015 at 4:09 AM, Rafael Adel

Re: [Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-30 Thread Rafael Adel
This is really driving me insane. I've something very similar to your sample Here https://github.com/rafaeladel/seven_event. I've specified table names inside models. But still the error occurs. Would you mind taking a look at it ? Thank you a lot so far for your time. On Thursday, April 30,

[Rails] ActionCable - where to preview/contribute?

2015-04-30 Thread Steven Talcott Smith
I would like to try ActionCable and will contribute documentation if needed. Is this project available anywhere yet? How can I participate? Steven -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop

[Rails] Re: I am creating a record in a table and after creation I want to create a record in another table

2015-04-30 Thread Chris Lerum
It's to your credit that you got that working, but it's far from conventional - why not post your attempt to get associations working, with your expected result vs. actual, and you'll soon be greeted with a nice 'AHA!' moment. I bet. On Thursday, April 30, 2015 at 10:18:28 AM UTC-4, Elizabeth

[Rails] Re: I am creating a record in a table and after creation I want to create a record in another table

2015-04-30 Thread Elizabeth McGurty
I don't know if this is an acceptable practice, but I do the following on update... and it works for me def update unless params[:id].blank? unless params[:parent_object].blank? @p_o_hold = @parent_object.find(params[id]) unless @p_o_hold.blank? myupdatehash = Hash.new /

[Rails] Re: I am creating a record in a table and after creation I want to create a record in another table

2015-04-30 Thread Elizabeth McGurty
I don't know if this is an acceptable practice, but I do the following on update... and it works for me, especially as I have not been been to get table associations to work. def update unless params[:id].blank? unless params[:parent_object].blank? @p_o_hold =

[Rails] Re: Copy-on-Write not working after fork when running GC in latest Ruby version

2015-04-30 Thread Thomas Kalmus
Small update. I have played with the GC and have run several tests. I manage to solve the problem by disabling the GC with GC.disable, but then my memory gets filled with garbages. I have also disabled hugepages on linux and no effects. Finally I've played with some of the parameters of the GC

[Rails] Re: I am creating a record in a table and after creation I want to create a record in another table

2015-04-30 Thread Elizabeth McGurty
Very, very kind I do now feel very motivated and it seems that I have finally discovered a support system. May take me days to restructure my site www.echomarket.org to prove or demonstrate my difficulties. Otherwise I thank you sincerely. Liz On Thursday, April 30, 2015 at 11:50:10 AM