Marnen Laibow-Koser wrote:
> 7H3LaughingMan wrote:
>> Alright I have set it all up and it will convert it to the lowest form
>> (and back for debugging purposes), however whenever I try to edit and
>> save using @armor.update_attributes(params[:armor]) it fails for some
>> reason. 
> 
> Fails in what way?
> 
>> Here is a link to show you what I did with the model...
>> 
>> http://pastebin.com/me807521
> 
> I'll check it out in detail later on.  On cursory inspection, however, 
> it looks like it has a lot of problems; I'll make some suggestions when 
> I'm not trying to type on my iPhone. :)

As promised, I've refactored and improved (I hope!) your code.  The new 
version is at http://pastebin.com/f4b92e46d .

One suggestion I didn't get to make in the source (because the method no 
longer exists with that name): convertDNDtoInt is not a Ruby-style name. 
The more Rubyish name would be convert_dnd_to_int.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to