This file contains 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
Processing Admin::ArticlesController#new (for 213.6.218.223 at 2010-02-24 22:15:42) [GET] | |
Parameters: {"action"=>"new", "controller"=>"admin/articles"} | |
^[[4;35;1mSite Load (0.2ms)^[[0m ^[[0mSELECT * FROM `sites` WHERE (`sites`.`host` = 'rushthinking.com') LIMIT 1^[[0m | |
^[[4;36;1mUser Load (0.7ms)^[[0m ^[[0;1mSELECT distinct users.*, memberships.admin as site_admin FROM `users` left outer join memberships on users.id = memberships.user_id WHERE (users.id = 1 and (memberships.site_id = 1 or users.admin = 1)) AND (users.deleted_at IS NULL OR users.deleted_at > '2010-02-24 22:15:42') ORDER BY users.login LIMIT 1^[[0m | |
^[[4;35;1mAsset Load (0.1ms)^[[0m ^[[0mSELECT * FROM `assets` WHERE (`assets`.site_id = 1 AND (parent_id is null)) ORDER BY created_at desc LIMIT 15^[[0m | |
^[[4;36;1mAsset Load (0.1ms)^[[0m ^[[0;1mSELECT * FROM `assets` WHERE (`assets`.`id` = 7 AND (`assets`.site_id = 1 AND (parent_id is null))) ORDER BY created_at desc^[[0m | |
Rendering /home/deploy/apps/mephisto/public/404.html (not_fou |
This file contains 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
<style> | |
td{ | |
width:20px; | |
} | |
td.movie-area{ | |
color: #fff; | |
background: #000; | |
} | |
.h0{ |
This file contains 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
-from = 12.00 | |
-to = 23.00 | |
%table.time-table | |
%tr | |
%th | |
-h = from | |
-until h >= to do | |
%th{ :colspan => 4 }= h | |
-h+=1 |
This file contains 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 Period < ActiveRecord::Base | |
belongs_to :show | |
def show_date | |
start_at.nil? ? Time.now.to_date : start_at.to_date | |
end | |
def start_at_time | |
start_at.nil? ? Time.now.to_time : start_at.to_time | |
end | |
def end_at_time |
This file contains 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
<div class="group"> | |
<%= f.label :show_id, "Show", :class => :label %> | |
<%= f.collection_select :show_id, @shows.collect, :id, :name %> | |
<span class="description">Select the show</span> | |
</div> | |
<div class="group"> | |
<%= f.label :show_date, "Date at", :class => :label %> | |
<%= f.date_select :show_date, :class => 'datetime_select' %> | |
<span class="description">Date of the show</span> |
This file contains 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 Ability | |
include CanCan::Ability | |
def initialize(user) | |
user ||= User.new #guest uesr | |
if user.is? 'developer' | |
can :manage, :all | |
end |
This file contains 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
products = Product.all :order => "id DESC" | |
i=1 | |
products.each{ |product| product.update_attribute('serial', i); i+=1 } |
This file contains 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
songs = Song.find_by_sql("SELECT * FROM songs GROUP BY genre") | |
songs.each{ |song| Genre.create!(:name => song.genre) } # Genre jahez | |
songs.each do |song| | |
genre = Genre.find_by_name(song.genre) | |
Music.create!(:genre_id => genre.id, :song_name => song.name) #Music table jahez related with Genre | |
end |
This file contains 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<link rel="shortcut icon" href="images/favicon.ico" > | |
<title>YASSENY Furniture</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<link href="style/styles.css" rel="stylesheet" type="text/css" /> | |
<script type="text/javascript" src="js/swfobject/swfobject.js"></script> | |
<script type="text/javascript"> | |
var flashvars = {}; |
This file contains 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 :header do -%> | |
Cases | |
<% end -%> | |
. | |
. | |
. | |
. | |
. | |
<% form_for (@kase), :html => { :multipart => true } do |f| %> | |
YOUR FORM STUFFS! |