我正在关注railstutorial.org教程我收到以下错误
1) User pages signup with valid information should create a user
Failure/Error: fill_in "password" , with: "foobar"
Capybara::ElementNotFound:
cannot fill in, no text field, text area or password field with id, name, or label 'password' found
# (eval):2:in `fill_in'
# ./spec/requests/user_pages_spec.rb:32:in `block (4 levels) in <top (required)>'
2) Authentication signin with invalid information
Failure/Error: before { click_button "Sign in" }
Capybara::ElementNotFound:
no button with value or id or text 'Sign in' found
# (eval):2:in `click_button'
# ./spec/requests/authentication_pages_spec.rb:14:in `block (4 …
Run Code Online (Sandbox Code Playgroud) 我在代码中创建了一个具有以下架构的表
DB.create_table :Pokemon do
primary_key :id
String :first_name
String :last_name
String :email
String :zipcode
String :company_name
String :google_profile
String :skype
String :phone
String :about
String :linkedin_profile_url
String :company_url
column :needs , 'Text[]'
column :offering , 'Text[]'
end
Run Code Online (Sandbox Code Playgroud)
为了需求和提供,我插入了一个带有以下代码的字符串数组
pokes=DB[:Pokemon];
off=['hello1' , 'hello2']
nee= ['need1' , 'need2']
pokes.insert(:first_name => 'abcd' ,:last_name => 'mehandiratta', :offering => off , :needs => nee)
Run Code Online (Sandbox Code Playgroud)
当我运行它时出现错误
PG::Error: ERROR: column "offering" is of type text[] but expression is of type record (Sequel::DatabaseError)
LINE 1: ...fering", "needs") VALUES …
Run Code Online (Sandbox Code Playgroud) 您好我在此代码/*类中收到以下错误:CreateMobileChatterCntrl说明:联系人发布Chatter.开发者:Harish Khatri(Appirio Offshore)创建日期:2012年6月2日*/
public without sharing class CreateMobileChatterCntrl {
public final Id ContactID{get;set;}
public String message{get;set;}
public boolean isSuccess{get;set;}
public boolean throwError{get;set;}
public String deviceType{get;set;}
//----------------------------------------------------------------------------
//constructor
//----------------------------------------------------------------------------
public CreateMobileChatterCntrl() {
throwError = false;
isSuccess = false;
if( ApexPages.CurrentPage().getParameters().get('id') != null){
ContactID = ApexPages.CurrentPage().getParameters().get('id');
}
String userAgent = ApexPages.currentPage().getHeaders().get('USER-AGENT');
if(userAgent.contains('iPhone'))
deviceType = 'iPhone';
//else if(userAgent.contains('Android')) deviceType = 'Android';
}
//----------------------------------------------------------------------------
// Post the chatter on contact
//----------------------------------------------------------------------------
public Pagereference save() {
if(message == null || message ==''){
throwError = true; …
Run Code Online (Sandbox Code Playgroud) 我收到以下错误
错误:编译错误:实体'Lead'上没有此列"所有者".如果您尝试使用自定义字段,请务必在自定义字段名称后附加"__c".请参考您的WSDL或描述调用以获取适当的名称.在第8栏第17栏
trigger Lead_Assignment on Lead (after insert) {
List<Lead> le=trigger.new;
User us=le.get(0).CreatedBy;
List<User> u=[SELECT id from USER WHERE At_Work__c=true];
List<integer> ii=new List<Integer>();
for(User uu:u){
Integer xx= [SELECT count() from Lead WHERE Owner=:uu];
}
}
Run Code Online (Sandbox Code Playgroud)
在Lead对象中有一个名为Owner的字段为什么我收到此错误请帮助解决此错误.
我正在构建一个visualforce页面我必须在pageblocksectionitem中创建一个visualforce页面,就像我在我的代码中显示的那样.我不太了解css.我的代码是
<apex:page standardController="Account">
<apex:pageBlock title="My Content">
<apex:pageBlockSection>
<apex:pageBlockSectionItem>
<apex:pageBlockTable value="{!account.Contacts}" var="item">
<apex:column value="{!item.name}"/>
</apex:pageBlockTable>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
Run Code Online (Sandbox Code Playgroud)
它显示的表格宽度小于屏幕宽度的一半.我不太了解css但是当我设置样式:{width:250%}然后它的宽度增加我必须设置多少百分比所以它的宽度将等于apex:pageblocktable没有被apex包围:blockSection和apex:pageBlockSectionItem或任何备用指南
我在正则表达式方面不擅长.我必须阅读一些文档很差的代码,任何人都可以告诉我这个正则表达式或代码行的含义是什么
myid.replace(/(:|\.)/g,'\\\\$1');
Run Code Online (Sandbox Code Playgroud)
请告诉这个reg ex的意思??
apex-code ×3
salesforce ×3
javascript ×1
postgresql ×1
rake ×1
regex ×1
ruby ×1
sequel ×1
visualforce ×1