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
| tsaleh@mommysgaragesale:/home/mgs_production/sites/mgs/releases$ ls | |
| 20081010085631 20081010155749 20081013035601 20081015052243 20081015085819 | |
| 20081010090902 20081013035444 20081013050138 20081015052428 20090611220654 | |
| tsaleh@mommysgaragesale:/home/mgs_production/sites/mgs/releases$ sudo tail -n 0 -f */log/production.log /var/log/nginx/*.log | |
| ==> 20081010085631/log/production.log <== | |
| ==> 20081010090902/log/production.log <== | |
| ==> 20081010155749/log/production.log <== |
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
| # avoids mass-assignment restriction for protected attributes | |
| def update_from_hash!(params) | |
| params.each {|method,value| self.send("#{method}=", value)} | |
| self | |
| 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
| class Account < ActiveRecord::Base | |
| has_many :users | |
| has_many :account_admin_permissions | |
| end | |
| @account.users.admins |
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
| context "on POST to /user_session/create with good creds" do | |
| setup do | |
| assert_nil UserSession.find | |
| assert_nil @controller.send(:current_user) | |
| @user = Factory(:user, :password => "foobar") | |
| post :create, :user_session => { :email => @user.email, :password => "foobar" } | |
| end | |
| # should_redirect_to("homepage") { root_url } | |
| should_set_the_flash_to /welcome/i | |
| 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
| class ApplicationController < ActionController::Base | |
| def current_user_session | |
| # return @current_user_session if defined?(@current_user_session) | |
| @current_user_session = UserSession.find | |
| end | |
| def current_user | |
| # return @current_user if defined?(@current_user) | |
| @current_user = current_user_session && current_user_session.user | |
| 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
| def require_no_user | |
| if current_user | |
| store_location | |
| flash[:notice] = "You must be logged out to access this page" | |
| redirect_to root_url | |
| return false | |
| end | |
| 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
| - semantic_form_for @page do |form| | |
| - form.inputs do | |
| = form.input :url | |
| - form.semantic_fields_for :notes, form.object.notes.build do |note_form| | |
| = note_form.input :title | |
| = note_form.input :body, :as => :text |
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 platos_forms chrome/content/ | |
| overlay chrome://browser/content/browser.xul chrome://platos_forms/content/platos-forms.xul | |
| skin platos_forms classic/1.0 chrome/skin/ | |
| style chrome://browser/content/browser.xul chrome://platos_forms/skin/toolbar-button.css | |
| style chrome://global/content/customizeToolbar.xul chrome://platos_forms/skin/toolbar-button.css |
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
| <tabbrowser id="content"> | |
| <xul:browser> | |
| <splitter id="platos-forms-splitter" collapse="after" persist="hidden"/> | |
| <iframe src="http://google.com" orient="vertical" width="320" min-width="28"> | |
| </iframe> | |
| </xul:browser> | |
| </tabbrowser> |
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
| *~ | |
| .DS_Store | |
| .*.swp |