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

2015-04-29 Thread Chris Lerum
In short, yes. See this lovely article; notice the conspicuous absence of any talk of changing table names: http://blog.makandra.com/2014/12/organizing-large-rails-projects-with-namespaces/ On Wednesday, April 29, 2015 at 1:59:04 PM UTC-4, Rafael Adel wrote: > > I can see the only difference is t

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

2015-04-29 Thread Padmahas Bn
First thing is I'm no using form_for or any other form tags. I have *a controller* class SomenamesController < ApplicationController def new @variable = Modelname.new end def create Modelname.methodfirst # methodfirst is class method redirect_

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

2015-04-29 Thread Chris Lerum
Not sure how useful this is, but I get it working if I change the table names to 'galleries' and 'photos'. updated: https://github.com/chrislerum/factory On Wednesday, April 29, 2015 at 1:59:04 PM UTC-4, Rafael Adel wrote: > > I can see the only difference is that in my case there's namespace in

[Rails] How to create a nested signup form?

2015-04-29 Thread nickk40
I have two models each with their own resources: Organizations and Members. An organization has multiple members and a member is only a member to one organization. How can I create a simple nested form that signs up a new organization as well as one member for that organization? My current

Re: [Rails] After processing data inside model,how to insert processed data(interest_to_be_paid etc) to database

2015-04-29 Thread Hassan Schroeder
On Wed, Apr 29, 2015 at 9:08 AM, Padmahas Bn wrote: > I mean that I'm not using association between tables when it is possible to > easily cascade changes done in one table, I'm afraid I don't understand that sentence, > And I've not seen anywhere inserting records through model directly ?? Fr

Re: [Rails] Re: "Successfully installed rails-4.2.1 ERROR: Could not find a valid gem '4.2.1' (>= 0) in any repo"

2015-04-29 Thread Rob Biedenharn
On 2015-Apr-29, at 13:30 , Bailey J wrote: > Thanks Rob, > > At this point I got the version I wanted even with the incorrect syntax, I > can just leave it as it is? > > -Bailey Yes, of course, the response was basically to point out where your command had done something that you hadn't rea

[Rails] Site announcement...

2015-04-29 Thread Elizabeth McGurty
A goodwill resource for lending, borrowing, donating and even trading items. Built in Ruby, 1.9.3, and Ruby on Rails, 3.1. www.echomarket.org. Liz McGurty Founder/Owner/Code -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubs

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

2015-04-29 Thread Rafael Adel
I can see the only difference is that in my case there's namespace in front of the table names and FK. But in yours there's none since it's a normal app. But is this the cause ? On Wednesday, April 29, 2015 at 6:53:18 PM UTC+3, Chris Lerum wrote: > > https://github.com/chrislerum/factory > I tri

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

2015-04-29 Thread Rafael Adel
I can see the only difference is the namespace of the engine is used but in your case is not, since it's a normal app. But is this the cause ? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiv

[Rails] Re: "Successfully installed rails-4.2.1 ERROR: Could not find a valid gem '4.2.1' (>= 0) in any repo"

2015-04-29 Thread Bailey J
Thanks Rob, At this point I got the version I wanted even with the incorrect syntax, I can just leave it as it is? -Bailey -- 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

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread Elizabeth McGurty
Go ahead with 'your good work'! You have no idea! I am not a wealthy person, but I am also a person of many responsibilities. For years I have trying to make a difference in this world with my talents and the free sources of Ruby, Ruby on Rails, Netbeans, Aptana, mySQL and the entirety of the

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread Hassan Schroeder
On Wed, Apr 29, 2015 at 9:33 AM, emm wrote: > I got a pretty scolding message from Hassan Schroeder. If *privately* providing feedback *which you requested* on your app constitutes "scolding" -- guilty as charged. Won't make that mistake again! -- Hassan Schroeder hass

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread emm
OMG! I had no idea that these dialogs were public. On Wed, Apr 29, 2015 at 12:58 PM, Krishna Gundala wrote: > Hi Emm, > No one has that right to scold or point at you. It's up to you to seek > help from this group. Don mind all this winds which come on your way... Jus > go head with your good w

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread Krishna Gundala
Hi Emm, No one has that right to scold or point at you. It's up to you to seek help from this group. Don mind all this winds which come on your way... Jus go head with your good work. On Wed, Apr 29, 2015, 12:34 PM emm wrote: > I got a pretty scolding message from Hassan Schroeder. Do you know

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread emm
I got a pretty scolding message from Hassan Schroeder. Do you know him of the Rails community? Liz On Wed, Apr 29, 2015 at 12:08 PM, Colin Law wrote: > On 29 April 2015 at 16:27, emm wrote: > > Do you mind if on GitHub I attribute guidance to you? > > I don't mind, but as I said I merely point

Re: [Rails] Re: Problem with validation

2015-04-29 Thread Colin Law
On 29 April 2015 at 17:14, Gm wrote: > If I put a simple p "a" inside the method, two inspects are displayed: > > (0.1ms) BEGIN > "a" >(0.1ms) ROLLBACK >(0.1ms) BEGIN > "a" >(0.1ms) ROLLBACK What code are you running that invokes the validation? Colin -- You received this mes

[Rails] Re: Problem with validation

2015-04-29 Thread Gm
If I put a simple p "a" inside the method, two inspects are displayed: (0.1ms) BEGIN "a" (0.1ms) ROLLBACK (0.1ms) BEGIN "a" (0.1ms) ROLLBACK On Wednesday, April 29, 2015 at 12:58:39 PM UTC-3, Gm wrote: > > Hi Chris. > It's just a simple validation method: > > validate :custom > > d

Re: [Rails] Re: Problem with validation

2015-04-29 Thread Colin Law
On 29 April 2015 at 16:58, Gm wrote: > Hi Chris. > It's just a simple validation method: > > validate :custom > > def custom > if self.text.blank? and self.persisted? > return errors.add(:base, 'Error') > else > end You are missing an end statement so whatever follows after this wil

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread Colin Law
On 29 April 2015 at 16:27, emm wrote: > Do you mind if on GitHub I attribute guidance to you? I don't mind, but as I said I merely pointed you to the site. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this

Re: [Rails] After processing data inside model,how to insert processed data(interest_to_be_paid etc) to database

2015-04-29 Thread Padmahas Bn
> > >What is it you believe is "not recommended"? > I mean that I'm not using association between tables when it is possible to easily cascade changes done in one table, And I've not seen anywhere inserting records through model directly and it's not even showed as example in rails guides. S

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread Colin Law
On 29 April 2015 at 16:24, emm wrote: > Dear Colin, > > I do not know to express myself here. I am so grateful! I made the fixes > and my site has passed validation site criteria. You were so gracious to > set up the validation site for me. I did not set anything up, merely pointed you to the

Re: [Rails] "Successfully installed rails-4.2.1 ERROR: Could not find a valid gem '4.2.1' (>= 0) in any repo"

2015-04-29 Thread Rob Biedenharn
On 2015-Apr-29, at 11:24 , Bailey J wrote: > Thanks that helps. So it was probably just the way I passed the command... > > This is what I typed "sudo gem install rails 4.2.1 --no-ri --no-rdoc", does > that look funny? You need to have "-v" in front of the version: sudo gem install

[Rails] Re: Problem with validation

2015-04-29 Thread Gm
Hi Chris. It's just a simple validation method: validate :custom def custom if self.text.blank? and self.persisted? return errors.add(:base, 'Error') else end Every custom method has this problem. On Wednesday, April 29, 2015 at 12:52:55 PM UTC-3, Chris Lerum wrote: > > It may hel

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

2015-04-29 Thread Chris Lerum
https://github.com/chrislerum/factory I tried whipping up an app with your code, the controller test passes fine for me, see if it works for you and compare. On Wednesday, April 29, 2015 at 10:32:47 AM UTC-4, Rafael Adel wrote: > > I'm trying to create a `photo` factory that's in a many to one as

[Rails] Re: Problem with validation

2015-04-29 Thread Chris Lerum
It may help if you showed us this code of which you speak. On Wednesday, April 29, 2015 at 10:52:06 AM UTC-4, Gm wrote: > > Hi, I'm using a custom validation method to validate some logic. > But I realized that the database query is running two times. > So the database is being called twice. > > T

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread emm
Do you mind if on GitHub I attribute guidance to you? Liz On Wed, Apr 29, 2015 at 11:24 AM, emm wrote: > Dear Colin, > > I do not know to express myself here. I am so grateful! I made the fixes > and my site has passed validation site criteria. You were so gracious to > set up the validation

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread emm
Dear Colin, I do not know to express myself here. I am so grateful! I made the fixes and my site has passed validation site criteria. You were so gracious to set up the validation site for me. My many thanks. Can we stay in touch? Sincerely, Elizabeth McGurty On Wed, Apr 29, 2015 at 9:44 A

[Rails] Re: "Successfully installed rails-4.2.1 ERROR: Could not find a valid gem '4.2.1' (>= 0) in any repo"

2015-04-29 Thread Bailey J
Thanks that helps. So it was probably just the way I passed the command... This is what I typed "sudo gem install rails 4.2.1 --no-ri --no-rdoc", does that look funny? Should I be concerned about the contents of this error message "Could not find a valid gem" or is it simply nothing more than

[Rails] Problem with validation

2015-04-29 Thread Gm
Hi, I'm using a custom validation method to validate some logic. But I realized that the database query is running two times. So the database is being called twice. The validation method just display an error if array items are duplicated. Log: Questao Load (0.4ms) ["a", "a"] Questao Load (0.4m

[Rails] Problem with validation

2015-04-29 Thread Gm
Hi, I'm using a custom validation method to validate some logic. But i realized that the database query is running two times. So the database is being called twice. The validation methos just display an error if array items are duplicated. Log: Prova Load (0.4ms) ["a", "a"] Questao Load (0.4ms)

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

2015-04-29 Thread Rafael Adel
I'm trying to create a `photo` factory that's in a many to one association with `gallery`. And I'm getting two errors, depending on how I specify the association between those two models. Here's the models: *Photo* belongs_to :gallery, class_name: "SevenGallery::Gallery" *Gallery* has_many

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread Colin Law
On 29 April 2015 at 14:17, emm wrote: > Thanks! Never knew about this service. Really thanks Will do > immediately. For pages that need login you can view the source in the browser, copy the whole thing, and paste it into a form on the validation site. I find it invaluable. Colin > Liz >

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread emm
Thanks! Never knew about this service. Really thanks Will do immediately. Liz On Wed, Apr 29, 2015 at 9:02 AM, Colin Law wrote: > On 29 April 2015 at 12:10, Elizabeth McGurty wrote: > > Writing from rural Virginia. I just finished the first phase of my > web-site: > > www.echomarket.org.

Re: [Rails] Announcing www.echomarket.org

2015-04-29 Thread Colin Law
On 29 April 2015 at 12:10, Elizabeth McGurty wrote: > Writing from rural Virginia. I just finished the first phase of my web-site: > www.echomarket.org. It's a goodwill resource for borrowing, lending, > donating and even trading nonperishable/ethical items. Of course, written > in Ruby on Rails

[Rails] Announcing www.echomarket.org

2015-04-29 Thread Elizabeth McGurty
Writing from rural Virginia. I just finished the first phase of my web-site: www.echomarket.org. It's a goodwill resource for borrowing, lending, donating and even trading nonperishable/ethical items. Of course, written in Ruby on Rails. Would gladly provide a guest username and password if

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

2015-04-29 Thread Colin Law
On 29 April 2015 at 09:17, Jagmeet Singh wrote: > I am inserting a record in 1st table named as Students and I want to insert > a record in another table with a value coming from a column Refid which is > in Students table You can create the record using something like Tablename.create(...) By t

[Rails] Re: "Successfully installed rails-4.2.1 ERROR: Could not find a valid gem '4.2.1' (>= 0) in any repo"

2015-04-29 Thread Frederick Cheung
On Wednesday, April 29, 2015 at 9:41:40 AM UTC+1, Bailey J wrote: > > "Successfully installed rails-4.2.1 > ERROR: Could not find a valid gem '4.2.1' (>= 0) in any repository" > > Does anyone recognize this error message or understand what it is saying I > should do? > That sounds like your Ge

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

2015-04-29 Thread Jagmeet Singh
*I am inserting a record in 1st table named as Students and I want to insert a record in another table with a value coming from a column Refid which is in Students table* -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe f

[Rails] "Successfully installed rails-4.2.1 ERROR: Could not find a valid gem '4.2.1' (>= 0) in any repo"

2015-04-29 Thread Bailey J
"Successfully installed rails-4.2.1 ERROR: Could not find a valid gem '4.2.1' (>= 0) in any repository" Does anyone recognize this error message or understand what it is saying I should do? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou