Alright I wrote a test and figured out what was wrong turned out that
I had the form submitting the data to the edit section of the
controller instead of the update section. I fixed it and it all works
out, when you use update_attributes it does use the override of the
set method.

Now then my only question now is where can I put the universal methods
that are going to be used by Models and Views, and Controllers /
Helpers if they need to be used by them. I read somewhere where you
would put it but since then I have forgotten and can't find it again.

On Nov 7, 10:28 pm, Marnen Laibow-Koser <rails-mailing-l...@andreas-
s.net> wrote:
> 7H3LaughingMan wrote:
> > Haven't really created any "proper" tests since I actually only have
> > one controller at the moment and I can test it via browser
>
> Not an excuse.  You should write tests before writing any application
> code at all.  That way you know your code does what you meant it to.
> Read up on test-first development and apply the practice religiously.
>
> > All of my
> > methods work however whenever I do an update it doesn't touch the set
> > method to change the variable. (Tested with simple outputing text to
> > say that it was being used)
>
> Right.  I don't think update_attribute would.
>
>
>
> > On Nov 7, 8:59 pm, Marnen Laibow-Koser <rails-mailing-l...@andreas-
>
> Best,
> --
> Marnen Laibow-Koserhttp://www.marnen.org
> [email protected]
> --
> Posted viahttp://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