github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

gshank / ravlog

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 5
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Tree: 2c88dd4

click here to add a description

click here to add a homepage

  • Branches (1)
    • master
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Perl Catalyst blog — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

removed no_render fields 
Zbigniew Lukasiak (author)
Thu Jun 18 14:27:46 -0700 2009
commit  2c88dd45416b4ad15a7ec6ca7309d72aa6181279
tree    2471cb040812a9bcf75bc0c7d4a92df4a22ca749
parent  f48ff66d1ca5c2b6e84fe1e65a99225b0ca79e60
ravlog / lib / RavLog / Schema / DB / Comment.pm lib/RavLog/Schema/DB/Comment.pm
100644 90 lines (78 sloc) 1.875 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package RavLog::Schema::DB::Comment;
 
use strict;
use warnings;
 
use base 'DBIx::Class';
 
__PACKAGE__->load_components( "PK::Auto", "InflateColumn::DateTime", "Core" );
__PACKAGE__->table("comments");
__PACKAGE__->add_columns(
   "comment_id",
   {
      data_type => 'integer',
      is_auto_increment => 1,
      default_value => undef,
      is_nullable => 0,
   },
   "name",
   {
      data_type => "character varying",
      default_value => undef,
      is_nullable => 1,
      size => 255,
   },
   "email",
   {
      data_type => "character varying",
      default_value => undef,
      is_nullable => 1,
      size => 255,
   },
   "url",
   {
      data_type => "character varying",
      default_value => undef,
      is_nullable => 1,
      size => 255,
   },
   "comment",
   {
      data_type => "text",
      default_value => undef,
      is_nullable => 1,
      size => undef,
   },
   "remote_ip",
   {
      data_type => "character varying",
      default_value => undef,
      is_nullable => 1,
      size => 32,
   },
   "created_at",
   {
      data_type => "datetime",
      default_value => "now()",
      is_nullable => 1,
      size => undef,
   },
   "article_id",
   { data_type => "integer", default_value => undef, is_nullable => 1, size => 4 },
);
 
use Text::Textile qw(textile);
 
sub textilize
{
   my $self = shift;
   my $what = shift;
 
   my $temp = $self->$what;
   $temp =~ s/\[code (.*?)\]/==<pre>\[code $1\]/g;
   $temp =~ s/\[\/code\]/\[\/code\]<\/pre>==/g;
   return textile($temp);
}
 
sub insert
{
   my $self = shift;
   $self->created_at( DateTime->now() );
   $self->next::method(@_);
}
 
__PACKAGE__->set_primary_key("comment_id");
 
__PACKAGE__->belongs_to( 'article', 'RavLog::Schema::DB::Article', 'article_id' );
 
1;
 
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server