Changeset 6817 for lang/ruby/pritter
- Timestamp:
- 02/17/08 16:49:44 (5 years ago)
- Location:
- lang/ruby/pritter
- Files:
-
- 2 added
- 4 modified
-
app/models/messenger.rb (modified) (1 diff)
-
app/models/tweet.rb (modified) (1 diff)
-
app/views/timeline/anybody.rhtml (modified) (1 diff)
-
db/migrate/003_change_tweet_time_type.rb (added)
-
db/migrate/004_set_dummy_time_stump_to_all_tweets.rb (added)
-
db/schema.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/pritter/app/models/messenger.rb
r5638 r6817 25 25 profile = Profile.find_or_create_by_jid( msg.from.node ) 26 26 27 tweet = Tweet.create!( :name => msg.from.node, :content => msg.body, :profile => profile )27 tweet = Tweet.create!( :name => msg.from.node, :content => Tweet.url2link_of_body(msg.body), :profile => profile ) 28 28 profile.tweetcount += 1 29 29 -
lang/ruby/pritter/app/models/tweet.rb
r5120 r6817 1 1 class Tweet < ActiveRecord::Base 2 2 belongs_to :profile 3 4 require 'uri' 5 6 def self.url2link_of_body( body ) 7 html_string = CGI::escapeHTML(body) 8 URI.extract(html_string).each{|url| 9 html_string.gsub!(url,"<a href='#{url}' target='_blank'>#{url}</a>") 10 } 11 html_string 12 end 13 3 14 end -
lang/ruby/pritter/app/views/timeline/anybody.rhtml
r6567 r6817 9 9 </head> 10 10 <body> 11 <h1> Pritter</h1>11 <h1><%= link_to( "Pritter", {:action=>:anybody}, :style=>'color:white;' ) %></h1> 12 12 <div id="about_pritter"><%= about_pritter %></div> 13 13 -
lang/ruby/pritter/db/schema.rb
r5120 r6817 3 3 # then regenerate this schema definition. 4 4 5 ActiveRecord::Schema.define(:version => 2) do5 ActiveRecord::Schema.define(:version => 4) do 6 6 7 7 create_table "profiles", :force => true do |t|
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)