selamat hari raya aidil adha in ruby on rails
Model:
class Friend < ActiveRecord::Base
end
class FamilyMember < ActiveRecord::Base
end
Controller:
class EidMessageController < ApplicationController
def forgive
@friends = Friend.find(:all, :conditions => “network = ‘close_friends’”,
rder => “rank ASC”)
@familymembers = FamilyMember.find(:all,
rder => “rank ASC”)
$message = “Selamat Hari Raya, Maaf Zahir Batin”
end
end
View:
app/views/eidmessage/forgive.rhtml
Dear,<br />
<% for friend in @friends %>
<%= friend.full_name %><br />
<% end %>
<% for family in @familymembers %>
<%= family.full_name %><br />
<% end %>
I wish you <%= $message %>



No Comments Comments Feed
Add a Comment
You must be logged in to post a comment.