Hi, am a rails newbie. I had problems with 2 tasks
i have created a guestbook app just to try out rails
users sign guestbook by leaving name and message
currently, the list action shows plain text like this:
Joe S.
love your guestbook
but i would like to add formating to the name field, say different
colour, bold, and add time eg:
Joe S. (in red colour) wrote 5 days ago
love your guestbook
The app also has an admin interface to edit and delete guest entries
i want any entry which was edited by the admin to append a note to the
message, saying “this entry was modified by admin”
how do i achieve the above 2 tasks?
database table guests has 2 columns, name and message
To test out how the various methods work, you should get used to using
irb
(interactive ruby). You start it by entering ‘ruby script\console’ at
the
command prompt in an application directory in Windows. And remember,
Google
is your friend.
The app also has an admin interface to edit and
delete guest entries i want any entry which was
edited by the admin to append a note to the
message, saying “this entry was modified by admin”
Assuming you have a login / authentication system in place, you’d add a
column to your table that allows you to record who does what to an
entry.
Recommend you pick up a book or two: “Agile Web D. with Rails”
and
“Programming Ruby” are the two most of us start with. Also recommend
working through one or more of the tutorials available online before
striking out on your own. The questions you’ve asked here are things
you’ll
learn in a couple of hours with most any of those.
Hi, am a rails newbie. I had problems with 2 tasks
i have created a guestbook app just to try out rails
users sign guestbook by leaving name and message
currently, the list action shows plain text like this:
Joe S.
love your guestbook
but i would like to add formating to the name field, say different
colour, bold, and add time eg:
Joe S. (in red colour) wrote 5 days ago
love your guestbook
The app also has an admin interface to edit and delete guest entries
i want any entry which was edited by the admin to append a note to the
message, saying “this entry was modified by admin”
how do i achieve the above 2 tasks?
database table guests has 2 columns, name and message
I hope I understand you corretly but I think so.
What you want is best done with css. If you have a or a
, or
what ever, you just add a class to it and define it in a stylesheet. If
you’ve done a scaffold you have a scaffold.css in the
/public/stylesheets folder. Or another css.
Add a class to the td in the view page like balalala