This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| # Calendar helper with proper events | |
| # http://www.cuppadev.co.uk/webdev/making-a-real-calendar-in-rails/ | |
| # | |
| # (C) 2009 James S Urquhart (jamesu at gmail dot com) | |
| # Derived from calendar_helper | |
| # (C) Jeremy Voorhis, Geoffrey Grosenbach, Jarkko Laine, Tom Armitage, Bryan Larsen | |
| # Licensed under MIT. http://www.opensource.org/licenses/mit-license.php | |
| ## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% render :partial => "comments/add_comment", :object => @comment = Comment.new, :locals => { :button_name => 'post comment' } %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h2>Welcome to Jibber!</h2> | |
| <% if @posts.size == 0 %> | |
| <p>I'm sorry, you need to write a post.</p> | |
| <% else %> | |
| <% @posts.each do |post| %> | |
| <div class="indexPostContainer"> | |
| <h3><%= link_to post.title, post %></h3> | |
| <h4>Posted by <%= post.user.name %> at <%= post.created_at %></h4> | |
| <h5>Tags: <%= post.tag_list %></h5> | |
| <%= markdown post.body %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h2>Welcome to Jibber!</h2> | |
| <% if @posts.size == 0 %> | |
| <p>I'm sorry, you need to write a post.</p> | |
| <% else %> | |
| <%= render :partial => @posts %> | |
| <% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| attr_accessor :new_password | |
| validates_presence_of :new_password, :on => :create | |
| validates_length_of :new_password, :minimum => 6, :allow_nil => true, :allow_blank => true, :unless => :new_password.blank? | |
| validates_confirmation_of :new_password | |
| before_save :set_encrypted_password | |
| def set_encrypted_password | |
| write_attribute(:password, Client.encrypt_password(@new_password)) unless @new_password.nil? || @new_password.blank? |
NewerOlder