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
./config/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:99:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement | |
[Deprecation Warning] Naming tasks with before_ and after_ is deprecated, please see the new before() and after() methods. (Offending task name was after_update_code) | |
[Deprecation Warning] Naming tasks with before_ and after_ is deprecated, please see the new before() and after() methods. (Offending task name was before_symlink) | |
[Deprecation Warning] Naming tasks with before_ and after_ is deprecated, please see the new before() and after() methods. (Offending task name was after_deploy) | |
* executing `deploy' | |
* executing `deploy:update' | |
** transaction: start | |
* executing `deploy:update_code' | |
updating the cached checkout on all servers | |
executing locally: "git ls-remote git@github.com:bodilija/simplesignup.git master" |
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
require File.dirname(__FILE__) + '/../config/environment' | |
set :application, "events" | |
set :rails_env, (ENV['env'] || "production") | |
set :deploy_to, (rails_env == "production" ? "/var/www/apps/#{application}" : "/var/www/apps/#{application}_#{rails_env}") | |
default_domain = case rails_env | |
when "production" | |
"simplesignup.se" | |
when "staging" | |
"simplesignup.se" |
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 BrowsingTest < ActionDispatch::PerformanceTest | |
def test_homepage | |
get '/' | |
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
/* | |
* Reference: http://alexmarandon.com/articles/web_widget_jquery/ | |
* Slider used: http://bxslider.com/examples | |
* Shadow effects: http://www.paulund.co.uk/creating-different-css3-box-shadows-effects | |
* Blogspot JSON feed: http://beautifulbeta.wikidot.com/json-feeds | |
* | |
* Usage: | |
* Add the following code in the html | |
* | |
* ------------------------------------------------------------------------------------------------ |
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
# File: config/initializers/date.rb | |
# Parse date using Rails I18n or Ruby parse method if it failed. | |
# Reference https://gist.github.com/179712 | |
module DateTimeI18nParser | |
module ClassMethods | |
def _parse_with_i18n(str, format = :default) | |
format ||= :default | |
date = self._strptime(str, I18n.translate("#{self.name.downcase}.formats.#{format}")) || _parse_without_i18n(str) | |
date[:year] += increment_year(date[:year].to_i) if date[:year] |
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
var $injector = angular.injector(['ng', 'custom_directives']); | |
var controllerDiv = $j(wrapper.find('div[ng-controller]')[0]); | |
$injector.invoke(function($rootScope, $compile, $document){ | |
$compile(controllerDiv)($rootScope); | |
$rootScope.$digest(); | |
}); |
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
<%= header do %> | |
<h1>Rails widget</h1> | |
<% end %> | |
<%= widget do |w| %> | |
<%= w.title do %> | |
Title | |
<% end %> | |
<%= w.content do %> | |
Content |
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
module WidgetHelper | |
def header(&block) | |
content_tag :div, class: 'header', &block | |
end | |
def widget(options={}, &block) | |
w = Widget.new(options, self) | |
widget_content = capture(w, &block) | |
content_tag :div, class: 'wrapper' do | |
widget_content |
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="header"> | |
<h1>Rails widget</h1> | |
</div> | |
<div class="wrapper"> | |
<h2> | |
Title | |
</h2> | |
<div class="content"> | |
Content |
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
Person.human_attribute_name("first_name") # => "First name" |
OlderNewer