diff options
-rw-r--r-- | app/models/blogpost.rb | 2 | ||||
-rw-r--r-- | app/models/forum.rb | 1 | ||||
-rw-r--r-- | app/models/forumgroup.rb | 2 | ||||
-rw-r--r-- | app/models/forumthread.rb | 1 | ||||
-rw-r--r-- | app/views/redstoner_mailer/email_change_confirm_mail.html.erb | 2 | ||||
-rw-r--r-- | app/views/redstoner_mailer/new_post_comment_mail.html.erb | 2 | ||||
-rw-r--r-- | app/views/redstoner_mailer/new_post_mention_mail.html.erb | 2 | ||||
-rw-r--r-- | app/views/redstoner_mailer/new_thread_mention_mail.html.erb | 2 | ||||
-rw-r--r-- | app/views/redstoner_mailer/new_thread_reply_mail.html.erb | 2 | ||||
-rw-r--r-- | app/views/redstoner_mailer/register_mail.html.erb | 2 |
10 files changed, 11 insertions, 7 deletions
diff --git a/app/models/blogpost.rb b/app/models/blogpost.rb index 9ff64fe..7275273 100644 --- a/app/models/blogpost.rb +++ b/app/models/blogpost.rb @@ -8,6 +8,8 @@ class Blogpost < ActiveRecord::Base belongs_to :user_editor, class_name: "User", foreign_key: "user_editor_id" has_many :comments, :dependent => :destroy accepts_nested_attributes_for :comments + validates_length_of :title, in: 5..255 + validates_length_of :content, in: 5..20000 def author @author ||= if self.user_author.present? diff --git a/app/models/forum.rb b/app/models/forum.rb index a239dbc..e892462 100644 --- a/app/models/forum.rb +++ b/app/models/forum.rb @@ -4,6 +4,7 @@ class Forum < ActiveRecord::Base belongs_to :role_read, class_name: "Role", foreign_key: "role_read_id" belongs_to :role_write, class_name: "Role", foreign_key: "role_write_id" has_and_belongs_to_many :labels + validates_length_of :name, in: 4..30 def to_s name diff --git a/app/models/forumgroup.rb b/app/models/forumgroup.rb index f9d156c..0d5c1f8 100644 --- a/app/models/forumgroup.rb +++ b/app/models/forumgroup.rb @@ -7,7 +7,7 @@ class Forumgroup < ActiveRecord::Base validates_presence_of :name, :position - validates_length_of :name, in: 2..20 + validates_length_of :name, in: 4..20 def to_s name diff --git a/app/models/forumthread.rb b/app/models/forumthread.rb index fd8d3c1..fe551c3 100644 --- a/app/models/forumthread.rb +++ b/app/models/forumthread.rb @@ -11,6 +11,7 @@ class Forumthread < ActiveRecord::Base validates_presence_of :title, :author, :forum validates_presence_of :content + validates_length_of :title, in: 5..255 validates_length_of :content, in: 5..20000 accepts_nested_attributes_for :threadreplies diff --git a/app/views/redstoner_mailer/email_change_confirm_mail.html.erb b/app/views/redstoner_mailer/email_change_confirm_mail.html.erb index 37a5fbe..8d108c9 100644 --- a/app/views/redstoner_mailer/email_change_confirm_mail.html.erb +++ b/app/views/redstoner_mailer/email_change_confirm_mail.html.erb @@ -25,7 +25,7 @@ <p>You can contact us via: <%= link_to "Website", root_url, style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Twitter", "https://twitter.com/RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | - <%= link_to "Google+", "https://google.com/+Redstoner", style: "text-decoration: none; color: #4096EE;" %> | + <%= link_to "Mastodon", "https://mstdn.io/@RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Email", "mailto:redstonerserver+website@gmail.com", style: "text-decoration: none; color: #4096EE;" %> </p> </div> diff --git a/app/views/redstoner_mailer/new_post_comment_mail.html.erb b/app/views/redstoner_mailer/new_post_comment_mail.html.erb index 6726535..08e1813 100644 --- a/app/views/redstoner_mailer/new_post_comment_mail.html.erb +++ b/app/views/redstoner_mailer/new_post_comment_mail.html.erb @@ -24,7 +24,7 @@ <p>You can contact us via: <%= link_to "Website", root_url, style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Twitter", "https://twitter.com/RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | - <%= link_to "Google+", "https://google.com/+Redstoner", style: "text-decoration: none; color: #4096EE;" %> | + <%= link_to "Mastodon", "https://mstdn.io/@RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Email", "mailto:redstonerserver+website@gmail.com", style: "text-decoration: none; color: #4096EE;" %> </p> </div> diff --git a/app/views/redstoner_mailer/new_post_mention_mail.html.erb b/app/views/redstoner_mailer/new_post_mention_mail.html.erb index aef3eef..08c8097 100644 --- a/app/views/redstoner_mailer/new_post_mention_mail.html.erb +++ b/app/views/redstoner_mailer/new_post_mention_mail.html.erb @@ -21,7 +21,7 @@ <p>You can contact us via: <%= link_to "Website", root_url, style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Twitter", "https://twitter.com/RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | - <%= link_to "Google+", "https://google.com/+Redstoner", style: "text-decoration: none; color: #4096EE;" %> | + <%= link_to "Mastodon", "https://mstdn.io/@RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Email", "mailto:redstonerserver+website@gmail.com", style: "text-decoration: none; color: #4096EE;" %> </p> </div> diff --git a/app/views/redstoner_mailer/new_thread_mention_mail.html.erb b/app/views/redstoner_mailer/new_thread_mention_mail.html.erb index 2aeaf0b..35904d0 100644 --- a/app/views/redstoner_mailer/new_thread_mention_mail.html.erb +++ b/app/views/redstoner_mailer/new_thread_mention_mail.html.erb @@ -23,7 +23,7 @@ <p>You can contact us via: <%= link_to "Website", root_url, style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Twitter", "https://twitter.com/RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | - <%= link_to "Google+", "https://google.com/+Redstoner", style: "text-decoration: none; color: #4096EE;" %> | + <%= link_to "Mastodon", "https://mstdn.io/@RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Email", "mailto:redstonerserver+website@gmail.com", style: "text-decoration: none; color: #4096EE;" %> </p> </div> diff --git a/app/views/redstoner_mailer/new_thread_reply_mail.html.erb b/app/views/redstoner_mailer/new_thread_reply_mail.html.erb index 4081f05..d71b136 100644 --- a/app/views/redstoner_mailer/new_thread_reply_mail.html.erb +++ b/app/views/redstoner_mailer/new_thread_reply_mail.html.erb @@ -26,7 +26,7 @@ <p>You can contact us via: <%= link_to "Website", root_url, style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Twitter", "https://twitter.com/RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | - <%= link_to "Google+", "https://google.com/+Redstoner", style: "text-decoration: none; color: #4096EE;" %> | + <%= link_to "Mastodon", "https://mstdn.io/@RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Email", "mailto:redstonerserver+website@gmail.com", style: "text-decoration: none; color: #4096EE;" %> </p> </div> diff --git a/app/views/redstoner_mailer/register_mail.html.erb b/app/views/redstoner_mailer/register_mail.html.erb index 35ccad9..f0af4a4 100644 --- a/app/views/redstoner_mailer/register_mail.html.erb +++ b/app/views/redstoner_mailer/register_mail.html.erb @@ -37,7 +37,7 @@ <p>You can contact us via: <%= link_to "Website", root_url, style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Twitter", "https://twitter.com/RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | - <%= link_to "Google+", "https://google.com/+Redstoner", style: "text-decoration: none; color: #4096EE;" %> | + <%= link_to "Mastodon", "https://mstdn.io/@RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> | <%= link_to "Email", "mailto:redstonerserver+website@gmail.com", style: "text-decoration: none; color: #4096EE;" %> </p> </div> |