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
@RestController | |
@RequestMapping("/reports") | |
public class ReportsController { | |
@RequestMapping(method = RequestMethod.GET) | |
public ResponseEntity getReport(HttpRequestServlet request) { | |
ReportGenerator reportGenerator = new ReportGenerator(request); | |
Report report = reportGenerator.createReport(); | |
// ... | |
return report; |
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
WebDriver driver=new ChromeDriver(); | |
driver.manage().window().maximize(); | |
driver.get("http://www.google.com"); | |
File src= ((TakesScreenshot)driver).getScreenshotAs("png"); |
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
<!DOCTYPE html> | |
<html ng-app="myApp"> | |
<head> | |
<meta charset="utf-8"/> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js" | |
data-semver="1.0.8"></script> | |
<script src="app.js"></script> | |
</head> | |
<body ng-controller="OuterCtrl"> | |
<p>your input is being bind from model. Your Input is : {{name}}!</p> |
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 'spec_helper' | |
describe 'users/user_details', type: :view do | |
it 'should render the user details view' do | |
form_builder = ActionView::Helpers::FormBuilder.new(:f, @user, self, {}, nil) | |
render :partial => 'users/user_details', locals: {f: form_builder} | |
# expectations | |
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
<%= f.hidden_field :user_phone %> | |
<%= f.hidden_field :user_address %> | |
<div> | |
<ul> | |
<li> | |
User Address: <%= f.text_field :user_address %> | |
</li> | |
<li> | |
User Phone: <%= f.text_field :user_phone %> |
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
<%= nested_form_for @user do |f| %> | |
<%= render :partial => 'user_details', :locals => { :f => f } %> | |
<% end %> |
NewerOlder