Jordon Bedwell wrote in post #1074013:
> On Friday, 31 August 2012 01:42:10 UTC-5, Ruby-Forum.com User wrote:
>
> I don't quite understand exactly what you mean but it sounds to me like
> you
> want a custom serializer.
> 
http://stackoverflow.com/questions/4472479/custom-serialization-for-fields-in-rails

Maybe some example information may help :)

The table in my database has a few different collumns, one of which is 
"message". In this column and example message looks like this:

"The [user] is logged in via [hostname]"

When i query the database and get back each of these matching rows, i 
would like to be able to split [user] and [hostname] into a user and 
host attributes so that i can call those attributes on my view, rather 
then have logic in my view that takes the message attribute and breaks 
it up for each row.

Please let me know if im still not making sense.

Thanks for your help.

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to