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
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
<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 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
-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
<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
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
--- | |
- - !ruby/object:Period | |
attributes: | |
created_at: 2010-02-22 20:36:58 | |
updated_at: 2010-02-22 20:36:58 | |
end_at: 2010-02-01 03:00:00 | |
start_at: 2010-02-01 01:00:00 | |
id: "1" | |
show_id: "1" | |
attributes_cache: |
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
/* | |
* Easy Slider 1.7 - jQuery plugin | |
* written by Alen Grakalic | |
* http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding | |
* | |
* Copyright (c) 2009 Alen Grakalic (http://cssglobe.com) | |
* Dual licensed under the MIT (MIT-LICENSE.txt) | |
* and GPL (GPL-LICENSE.txt) licenses. | |
* | |
* Built for jQuery library |
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
<r:random> | |
<r:option><r:assets:image title="welcome-main-ar" /></r:option> | |
<r:option><r:assets:image title="welcome-main-en" /></r:option> | |
<r:option><r:assets:image title="welcome-main-es" /></r:option> | |
<r:option><r:assets:image title="welcome-main-it" /></r:option> | |
</r:random> | |