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
puts "Hello there, what's your name" | |
name = gets | |
puts "What's your middle name, #{name}" | |
mname = gets.chomp | |
puts "What's your last namme, #{name} #{mname}" | |
lname = gets.chome | |
puts "Wow, so your name is #{name} #{mname} #{lname}" | |
puts "What's your favorite number?" | |
number = gets.chomp.to_i | |
add= 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 Greeter | |
def initialize(name = "World") | |
@name = name | |
end | |
def say_hi | |
puts "Hi #{@name}!" | |
end | |
def say_bye |
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
$:.push "rails/activesupport/lib" | |
$:.push "rails/actionpack/lib" | |
require "action_controller" | |
class Kaigi < ActionController::Http | |
include AbstractController::Callbacks | |
include ActionController::RackConvenience | |
include ActionController::Renderer | |
include ActionController::Layouts |
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
#p-cactions li { | |
border-top-left-radius: .5em; | |
border-top-right-radius: .5em; | |
-moz-border-radius-topleft: .5em; | |
-moz-border-radius-topright: .5em; | |
-webkit-border-top-left-radius: .5em; | |
-webkit-border-top-right-radius: .5em; | |
-khtml-border-top-left-radius: .5em; | |
-khtml-border-top-right-radius: .5em; | |
} |
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
named_scope :bill_on, lambda { |*args| | |
date_to_bill = args[0]||Time.now.to_date | |
if date_to_bill.day < 27 | |
{ :conditions => "DAY(billing_date) = #{date_to_bill.day}" } | |
else | |
offset = date_to_bill.end_of_month.day - date_to_bill.day | |
{ :conditions => "( DAY(LAST_DAY(CURRENT_DATE))-DAY(billing_date) ) = #{offset}" } | |
end | |
} | |
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
<!--- RENDERED PARTIAL > | |
<tr> | |
<td><%=h bug.user.company_name %> </td> | |
<td>Submitted by <%=h bug.submitter %></td> | |
<td><%=h bug.subject %> </td> | |
<td> <%=h truncate(bug.description.gsub(/<.*?>/,''), :length => 80) %> </td> | |
<td> <%= link_to 'Show', bug %> </td> | |
<% if session[:admin] %> | |
<td> <%= link_to 'Edit', edit_bug_path(bug)%> </td> |
NewerOlder