我正在玩谷歌InfoWindow.
几乎一切都很完美.我只是在窗户上遗漏了一些东西.
我总是有一个正确的底部空白区域.
我不介意那个底部,但我想摆脱正确的一个.
知道怎么做吗?

编辑,这是代码:
<div class="gm-style-iw" style="position: absolute; left: 12px; top: 9px; overflow: auto; width: 352px; height: 290px;">
<div class="" style="overflow: auto;">
<div class="infoBox">
<div style="max-width: 352px; padding: 0px;">
<div id="info-map-element">
<div class="street">
<img src="http://maps.googleapis.com/maps/api/streetview?size=360x190&location=37.7831059,-122.4446528&fov=90&heading=235&pitch=10&sensor=false" alt="">
<div class="shadow"></div>
<div class="title"> Customer History<br> 123 Foo Av, San Francisco, CA 12345</div>
</div>
<div class="wrap clearfix">
<div class="item clearfix">
<small>2013-09-11</small>
<p>This is the a test of customer history purchases.</p>
<div class="row clearfix">
<div class="col-lg-5"> Cost Estimate <span>$11000</span></div>
<div class="col-lg-7"> Purchase No. …Run Code Online (Sandbox Code Playgroud) 我的ruby应用程序分为不同的命名空间.喜欢:free(free.domain.com),pro(pro.domain.com),vip(vip.domain.com)在routes文件中如下所示:
namespace :free do
match 'home' => 'free#home', :via => [:get, :post], :as => :home
#more routes
end
namespace :pro do
match 'home' => 'pro#home', :via => [:get, :post], :as => :home
#more routes
end
namespace :vip do
match 'home' => 'vip#home', :via => [:get, :post], :as => :home
#more routes
end
match '/about' => 'pages#about'
match '/team' => 'pages#team'
match '/press' => 'pages#press'
#more routes
Run Code Online (Sandbox Code Playgroud)
我希望无论我在应用程序中有什么链接,如pro_home_path,url都是pro.domain.com/home.
所以基本上,在路由文件中是否可以添加子域(类似这样namespace :vip, :subdomain => vip do)将子域附加到相应的命名空间?
编辑:所以我添加了一个constraint constraints(:subdomain => …
我没有找到如何获得按键的值.我现在有
$('#info_price').bind('keydown',function(evt){
alert(evt.keyCode);
Run Code Online (Sandbox Code Playgroud)
但当我按1而不是返回'1'时它返回'49'.
编辑:我知道密钥'1'的Ascii代码.
最终目标是允许人们只在输入中写入数字.所以我想检测非数字而不显示它们.
无论什么时候我都在使用gem,而且我无法让我的跑步者指令正常工作.
我收到这个错误:
/Users/bl0b/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands/runner.rb:53:in `eval': undefined method `run' for #<Class:0x007f97d88744a8> (NoMethodError)
from (eval):1:in `<top (required)>'
from /Users/bl0b/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands/runner.rb:53:in `eval'
from /Users/bl0b/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands/runner.rb:53:in `<top (required)>'
from /Users/bl0b/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands.rb:64:in `require'
from /Users/bl0b/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands.rb:64:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Run Code Online (Sandbox Code Playgroud)
我的代码中包含以下代码shedule.rb:
set :environment, 'development'
every 1.minutes do
runner "Crawler.run", :output => '/Users/bl0b/Projects/crawler/cron.log'
end
Run Code Online (Sandbox Code Playgroud)
在我的app/models/crawler.rb我有以下代码:
class Crawler < ActiveRecord::Base
def run
puts "toto"
end
end
Run Code Online (Sandbox Code Playgroud) 所以我有一个预先注册用户的应用程序.未来的用户可以声明他们的个人资料,但管理员必须手动审核.
所以,我有一个表users和user_revision.如果管理员拒绝了索赔,我需要恢复所做的更改.
我是这样做的:
Followup.find(params[:followup]).user.update_attributes(UserRevision.find(followup.i_nid).attributes)
Run Code Online (Sandbox Code Playgroud)
但由于某些原因突然我有以下错误,我不知道如何解决它:
NoMethodError(未定义的方法`each'表示"":String):
编辑:这是完整的痕迹
activerecord (3.2.13) lib/active_record/associations/collection_association.rb:310:in `replace'
activerecord (3.2.13) lib/active_record/associations/collection_association.rb:41:in `writer'
activerecord (3.2.13) lib/active_record/associations/builder/association.rb:51:in `block in define_writers'
activerecord (3.2.13) lib/active_record/attribute_assignment.rb:85:in `block in assign_attributes'
activerecord (3.2.13) lib/active_record/attribute_assignment.rb:78:in `each'
activerecord (3.2.13) lib/active_record/attribute_assignment.rb:78:in `assign_attributes'
activerecord (3.2.13) lib/active_record/persistence.rb:216:in `block in update_attributes'
activerecord (3.2.13) lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
activerecord (3.2.13) lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
activerecord (3.2.13) lib/active_record/transactions.rb:208:in `transaction'
activerecord (3.2.13) lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
activerecord (3.2.13) lib/active_record/persistence.rb:215:in `update_attributes'
app/controllers/admin/contractor_controller.rb:66:in `reject'
actionpack (3.2.13) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.2.13) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.13) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.13) lib/abstract_controller/callbacks.rb:18:in …Run Code Online (Sandbox Code Playgroud) javascript ×2
css ×1
google-maps ×1
html ×1
infowindow ×1
jquery ×1
keypress ×1
namespaces ×1
routes ×1
runner ×1
subdomain ×1
whenever ×1