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
Wakupdude.controllers :dudes do | |
set :haml, {:format => :html5 } | |
# get :index do | |
# render "dudes/index" | |
# end | |
get :all, :map => "/" do | |
@dudes = Dude.all() | |
render "dudes/list" |
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
# Small reformats | |
if !absolute_map | |
path.gsub!(%r{/?index/?}, '') # Remove index path | |
path[0,0] = "/" unless path =~ %r{^\(?/} # Paths must start with a / | |
path.sub!(%r{/(\))?$}, '\\1') # Remove latest trailing delimiter | |
path.gsub!(/\/(\(\.|$)/, '\\1') # Remove trailing slashes | |
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
if !absolute_map or !@_map.blank? | |
# Add any controller level map to the front of the path | |
path = "#{@_map}/#{path}".squeeze('/') | |
# Small reformats | |
path.gsub!(%r{/?index/?}, '') # Remove index path | |
path[0,0] = "/" unless path =~ %r{^\(?/} # Paths must start with a / | |
path.sub!(%r{/(\))?$}, '\\1') # Remove latest trailing delimiter | |
path.gsub!(/\/(\(\.|$)/, '\\1') # Remove trailing slashes | |
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
In: | |
http://github.com/dariocravero/padrino-framework/blob/map-forward-slash/padrino-core/test/test_routing.rb#L502 | |
should 'apply maps' do | |
mock_app do | |
controllers :admin do | |
get(:index, :map => "/"){ "index" } | |
get(:show, :with => :id, :map => "/show"){ "show #{params[:id]}" } | |
get(:edit, :map => "/edit/:id/product"){ "edit #{params[:id]}" } |
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
daris@daris:~/dev/projects/gci_onlinetest$ padrino console | |
=> Loading development console (Padrino v.0.9.18) | |
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- readline (LoadError) | |
from <internal:lib/rubygems/custom_require>:29:in `require' | |
from /home/daris/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>' | |
from <internal:lib/rubygems/custom_require>:29:in `require' | |
from <internal:lib/rubygems/custom_require>:29:in `require' | |
from /home/daris/.rvm/gems/ruby-1.9.2-p0/gems/padrino-core-0.9.18/lib/padrino-core/cli/base.rb:59:in `console' | |
from /home/daris/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.4/lib/thor/task.rb:22:in `run' | |
from /home/daris/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.4/lib/thor/invocation.rb:118:in `invoke_task' |
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 CardVariation | |
includes Mongoid::Document | |
references_one :language | |
field :name | |
end | |
class Language | |
includes Mongoid::Document | |
referenced_in :card_variation |
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
daris@daris:~/Documents/dev/projects/wheresmymoney$ padrino g plugin coffee | |
=> Located unlocked Gemfile for development | |
apply https://github.com/padrino/padrino-recipes/raw/master/plugins/coffee_plugin.rb | |
/home/daris/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:677:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError) | |
from /home/daris/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:677:in `connect' | |
from /home/daris/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:637:in `do_start' | |
from /home/daris/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:626:in `start' | |
from /home/daris/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:306:in `open_http' | |
from /home/daris/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:769:in `buffer_open' | |
from /home/daris/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:203:in `block in open_loop' |
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
daris@daris:~/Documents/dev/projects/wheresmymoney$ padrino g plugin coffee | |
=> Located unlocked Gemfile for development | |
apply https://github.com/padrino/padrino-recipes/raw/master/plugins/coffee_plugin.rb | |
/home/daris/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/net/http.rb:586:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError) | |
from /home/daris/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/net/http.rb:586:in `connect' | |
from /home/daris/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/net/http.rb:553:in `do_start' | |
from /home/daris/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/net/http.rb:542:in `start' | |
from /home/daris/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/open-uri.rb:242:in `open_http' | |
from /home/daris/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/open-uri.rb:616:in `buffer_open' | |
from /home/daris/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/open-uri.rb:164:in `open_loop' |
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
ruby-1.9.2-p180 :011 > PapercrowdApp::deliver(:reviewers, :invitation_email_existing_user, "Dario", "[email protected]", "http://www.exordo.com") | |
DEBUG - [12/Jul/2011 15:35:28] "Resolving layout /viewslayouts/email" | |
NameError: undefined local variable or method `name' for #<Mail::Message:0x00000105af2340> | |
from /Users/daris/.rvm/gems/ruby-1.9.2-p180/gems/mail-2.3.0/lib/mail/message.rb:1289:in `method_missing' | |
from /Users/daris/Documents/starlight/exordo/app_ruby/trunk/app/views/mailers/reviewers/invitation_email_existing_user.haml:1:in `evaluate_source' | |
from /Users/daris/.rvm/gems/ruby-1.9.2-p180/gems/tilt-1.3.2/lib/tilt/template.rb:209:in `instance_eval' | |
from /Users/daris/.rvm/gems/ruby-1.9.2-p180/gems/tilt-1.3.2/lib/tilt/template.rb:209:in `evaluate_source' | |
from /Users/daris/.rvm/gems/ruby-1.9.2-p180/gems/tilt-1.3.2/lib/tilt/template.rb:144:in `cached_evaluate' | |
from /Users/daris/.rvm/gems/ruby-1.9.2-p180/gems/tilt-1.3.2/lib/tilt/template.rb:127:in `evaluate' | |
from /Users/daris/.rvm/gems/ruby-1.9.2-p |
OlderNewer