diff --git a/README.rdoc b/README.rdoc index 8b4cd8e..daae94f 100644 --- a/README.rdoc +++ b/README.rdoc @@ -3,6 +3,9 @@ Demo for Forum Monster Forum Gem https://github.com/gitt/forum_monster +Live demo available here +http://forum_monster.dev.codezombie.org/ + Just download, bundle, and run. git clone git@github.com:gitt/forum_monster_demo.git @@ -10,4 +13,15 @@ Just download, bundle, and run. cd forum_monster_demo bundle install - rails s \ No newline at end of file + rake db:create + rake db:migrate + rake db:seed + + rails s + +2 Logins, 2 categories, and 5 forums are already setup for you to play with. You can create more as well + +The admin login is admin/forum_admin +The user login is user/forum_user + +In addition to the 2 above users, you can use the registration process as normal. \ No newline at end of file diff --git a/app/models/user.rb b/app/models/user.rb index e7f5ca5..aa2be83 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -16,6 +16,6 @@ class User < ActiveRecord::Base has_many :posts, :dependent => :destroy def admin? - true if self.username == 'codezombie' + true if self.username == 'admin' end end diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index e39b74e..99a3809 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -1,21 +1,29 @@ -
<%= f.label :username %>
- <%= f.text_field :username %>
<%= f.label :email %>
- <%= f.email_field :email %>
<%= f.label :password %>
- <%= f.password_field :password %>
<%= f.label :password_confirmation %>
- <%= f.password_field :password_confirmation %>
<%= f.submit "Sign up" %>
-<% end %> - -<%= render :partial => "devise/shared/links" %> +Forum Monster is a simple forum generator written in rails 3. The goal of Forum Monster, is to provide a simple, and easy to setup forum application without having to dictate how your site it setup.
+The email field is required, but none of the data is saved for more than a day. Feel free to put in a fake address.
+
+ Username:
+ <%= f.text_field :username, :style => "font-size:2.2em", :autocomplete => "off" %>
+
+ Email Address:
+ <%= f.text_field :email, :style => "font-size:2.2em", :autocomplete => "off" %>
+
+ Password:
+ <%= f.password_field :password, :style => "font-size:2.2em", :autocomplete => "off" %>
+
+ Confirm Password:
+ <%= f.password_field :password_confirmation, :style => "font-size:2.2em", :autocomplete => "off" %>
+
<%= f.submit "Sign up" %>
+ <% end %> +<%= f.label :email %>
- <%= f.email_field :email %>
<%= f.label :password %>
- <%= f.password_field :password %>
<%= f.check_box :remember_me %> <%= f.label :remember_me %>
- <% end -%> - -<%= f.submit "Sign in" %>
-<% end %> - -<%= render :partial => "devise/shared/links" %> \ No newline at end of file ++ Forum Monster is a simple forum generator written in rails 3. The goal of Forum Monster, is to provide a simple, and easy to setup forum application without having to dictate how your site it setup. +
You can login with the following information:
+Admin Demo: admin/forum_admin
+User Demo: user/forum_user
+ +<%= f.text_field :username , :value => "username", :style => "font-size:2.2em;" %>
+<%= f.password_field :password, :value => "password", :style => "font-size:2.2em" %>
+ <%= f.submit 'Sign in' %> + <% end %> +
Total number of registered users: <%= User.count %>
- Newest registered user: <%= link_to User.last.username %>
+ Newest registered user: <%= link_to User.last.username unless User.last.nil? %>