Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding language specs to the code snippets in sequel plugins.

  • Loading branch information...
commit db64d75a10d733e30e921f9648c4c72343fa99e6 1 parent dafc582
@jdunphy jdunphy authored
View
3  book-content/en/5-interacting-with-the-database-sequel/6-sequel-plugins.markdown
@@ -16,6 +16,7 @@ As the name would indicate, sequel\_timestamped will update standard timestamp c
class Note < Sequel::Model
is :timestamped
end
+{:lang=ruby html_use_syntax=true}
If the model has `created_at` and `updated_at` timestamp columns, they will be updated as expected.
@@ -35,6 +36,7 @@ Not-naughty is a gem that provides an easily extensible validation framework.
length_of :login, :minimum => 5
end
end
+{:lang=ruby html_use_syntax=true}
Here's the [sequel\_notnaughty source][], and the [not-naughty source][].
@@ -53,6 +55,7 @@ The plugin adds functionality to Sequel's associations to handle these situation
is :polymorphic
many_to_one :attachable, :polymorphic => true
end
+{:lang=ruby html_use_syntax=true}
This will create a transparent polymorphic relationship between the Note and its Assets.
Please sign in to comment.
Something went wrong with that request. Please try again.