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
validates :email, | |
:exclusion => {:in => ["mydomain"], | |
:message => "is reserved" } |
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
- title t(:title, :scope => :register) | |
%h1= yield(:title) | |
#col1 | |
%p | |
=t(:welcome_text, :scope => :register) | |
= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| | |
= devise_error_messages! |
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
= simple_form_for @message do |f| | |
-if @message.errors.any? | |
#error_explanation | |
%h2= "#{pluralize(@message.errors.count, "error")} prohibited this message from being saved:" | |
%ul | |
- @message.errors.full_messages.each do |msg| | |
%li= msg |
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
class HomeController < ApplicationController | |
before_filter :authenticate_user!, :except =>"index" | |
def index | |
if user_signed_in? | |
@user = Profile.find(current_user) |
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
#flash | |
- unless flash.empty? | |
= content_tag :div, flash[:notice], :class => "notice" if flash[:notice] | |
= content_tag :div, flash[:warning], :class => "warning" if flash[:warning] | |
= content_tag :div, flash[:error], :class => "error" if flash[:error] |
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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
before_filter :check_beta | |
before_filter :set_locale | |
def check_beta | |
if APP_CONFIG['beta'] = true |
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
* sessions are like groups, nothing to do with logged in | |
class Session < ActiveRecord::Base | |
has_many :participants | |
has_many :users, :through => :participants | |
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
- content_for :js_manual do | |
= javascript_include_tag 'js_manual/counters/members' |
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
# == Schema Information | |
# | |
# Table name: assets | |
# | |
# id :integer(4) not null, primary key | |
# description :text | |
# file :string(255) | |
# attachable_id :integer(4) | |
# attachable_type :string(255) | |
# created_at :datetime |
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
namespace :db do | |
desc "Populate Users Table with images from /public/feedimg" | |
task :populate => :environment do | |
require "populator" | |
require "faker" | |
User.populate 1 do |user| | |
user.username = Faker::Name.first_name.downcase | |
user.email = Faker::Internet.user_name + "@myhost.com".downcase | |
user.encrypted_password = "27e50904b7a1c29a43e347eef5f6144303b516b7364a4a093e022435e0b3479024d57cbfds32499c30154a1a3e0d903c12b320c4f44844aa4d52c49b31f58f" |