ruby on rails - Question about editing by multiple Models and one controller -
I have three models (word, adjective, adverb) and a controller (word) that have these Models. I have to manage:
Since using STI (single table legacy), there are adjextitives and verb adjective words that look like an ideal situation, in order to obtain it, you will need a string field that will be used for your words The table has been typed. You can do it like this: and then in your controller:
def = edit word = Word.find (parameter [: id]) @ adjektiv = Adjektiv .find (parameter [: id]) @adverb = Adverb.find (Parameter for example: When I see an adverb of adverb (id = 1), and in the text box in Word with Eddie = 1, So I want to edit it. I like how can I do this to see Edwardb's first record? Thanks
def word & lt; ActiveRecord :: Base and Def Adjacquiv & lt; Word and Deaf Edwards & lt; Word and
def edit = word = word.find (params [: id]) end < / Pre>
Comments
Post a Comment