RAIL PREMIUM TATKAL

I've just booked a ticket from a travel agent, they showed me a PDF of that ticket for a total price of 2490.56 INR, but when I checked the IRCTC app's PNR request, it shows in 2049 that it turns me into a confusion. Can anyone help with this topic, please.

ruby on rail – How to create a database of S3 in a RoR app

I've loaded images into my bucket in S3 and would like to request these files in my seed.

Here is my actual seed.rb (which uses my locally saved images via local storage):

call for "faker"

Item.destroy_all

20th times do | i |
item = Item.create! (
Title: Faker :: Games :: Pokemon.name,
Description: Faker :: Lorem.paragraph_by_chars (60, false),
Price: 5.0)
item.image.attach (io: File.open ("app / assets / images / chatons / # {i} .jpg"), filename: "# {i} .jpg")

The End

So I have two simple questions:

  • Is it possible first?
  • and if so, how should I proceed?

Device Recommendation – With which rail can I build a center camera with a tilt shift?

I'm building a medium format camera that uses 120 movies and contains several digital and video parts. The final picture format is 6×45 cm.
I would like to mount the lens on a rail that allows tilting and shifting, allowing me to focus from macro to infinity, and fitting their brackets to the body and lens I want to use.
Many commercial bellows (Canon Auto Bellows, etc.) are a good start, but do not allow tilting / shifting.

What is a good rail with bellows, with which I could build the camera like this?

Webforms – Send a form in Rail with Unity to an HTTP server

I am trying to use UnityWebRequest to send a form to a Ruby on Rails server. However, the error "HTTP / 1.1 404 Not Found" will still be displayed.

My code is here:

public void Update_GI_Score () {StartCoroutine (Update_GI_Score_FORM ()); }

    IEnumerator Update_GI_Score_FORM ()
{
WWWForm form = new WWWForm ();
form.AddField ("myField", "myData");
Game Game = Singleton.GameInstance;
foreach (result s in game.scores)
{
form.AddField ("name", s.Name);
form.AddField ("value", s.rate.ToString ());
}
var url = RequestController.Instance.baseURL + "atualiza_score";
UnityWebRequest www = UnityWebRequest.Post (URL, Form);
Yield Return www.SendWebRequest ();
if (www.isNetworkError || www.isHttpError)
{
Debug.Log (www.error);
}
otherwise
{
Debug.Log ("Form upload completed!");
}
}

In the rail routes I have:

Post & nbsp; atualiza_score & # 39 ;, Controller: & nbsp; integracao_games & nbsp ;, Action :: atualiza_score

So how can I get the form correct? I have to save the field in a database

Many Thanks.

Migrations in lib / Tasks / Migration – Ruby on rail

In my Ruby on Raille project that I am working on, I have noticed that they are migrating along the route lib / Tasks / Migration I do not know exactly how that worked and why it's done, but I have to use the same format and generate migrations that way.
I have a few questions:

1.- Because migrations are created on this route and not in db / migrate? (I have not found any information)

2.- How can I generate a migration on this route?

Ruby on rail – If a valid certificate file (PEM file) exists, upload the file

I just want to upload a certificate file when the credential_type is Linux, If it's windows, I do not want to upload the certificate.

Class Proof of Entitlement < ApplicationRecord
  enum credential_type: { windows: 1, linux: 2 }

  validates :user_name,       presence: { message: "User name can't be empty" }
  validates :credential_type, presence: true
  validate  :must_be_pem,     if: -> {Linux? && cert_file_path.present? }

def must_be_pem
cert_error_msg = & # 39; certificate is not valid & # 39;
fm = FileMagic.new (FileMagic :: MAGIC_MIME)
if fm.file (cert_file_path) = ~ / ^ text  // # text / plain
first_line = File.open (Appendix) {| f | f.readline}
if first_line.include? & # 39; ----- BEGIN RSA PRIVATE KEY ----- & # 39;
upload_certificate
otherwise
errors.add (: cert_file_path, cert_error_msg)
The End
otherwise
errors.add (: cert_file_path, cert_error_msg)
The End
The End

def upload_certificate
upload_dir = Rails.root.join (& # 39; private & # 39 ;, & # 39; certificate & # 39 ;, cert_file_path.original_filename)
File.open (cert_file_path, & # 39; w & # 39;) {| f | f.write (attachment.read)}
The End
The End

Do I need to get some code out of the model and use controller like certificate upload thing or should I use it? .valid? in the controller before saving. Here is my controller code:

create def
@credential = credential.new (credential_params)
Answer_on | format |
if @ credential.save
format.html {redirect_to credentials_url, Note: & # 39; Credential was successfully assigned. & # 39; }
format.js
format.json {render: show, status :: created, location: @credential}
otherwise
format.html {render: new}
format.js
format.json {render json: @ credential.errors, status :: unprocessable_entity}
The End
The End
The End

Update the values ​​of a table stuck in an array on Ruby on the rail

My problem is that I want to capture some data with a barcode gun. It works by reading the code and entering it automatically. In an input text I can enter several numbers that are read with the barcode gun. If you have an amount of X, you can transfer this collection of numbers with those numbers in that row to change a status field that I have from warehouse to transporter.

Many Thanks

Use ruby ​​on rails 5.2

Macro – What is a Focusing Rail?

The Focusing Rail is a type of camera mount that allows you to move the camera back and forth on a very small scale.


(Picture from article at Earthbound Light)

The reason for their use is that you have such a shallow depth of field in macro photography that it is easier to focus the lens at the given distance and then move the camera so that the desired parts are in focus, rather than the other Direction Always use the maximum magnification if you need to.

ruby on rail – Problem displaying all Json related objects in a model by their ID in RoR

I'm something new in rails and I have a show method that needs to depict Json objects from three models linked by their ID.

The models are the following:

Class Company <ApplicationRecord
has_many: areas
The End


Class Area <ApplicationRecord
belongs_to: company
has_many: area_contacts
The End

Class AreaContact <ApplicationRecord
belongs_to: area
The End

If the company has a company_id and is linked to the model space by this field, and area_contact is linked to the model space by the area_id field.

My show method in the companies_controller.rb file is defined as follows:

show def
@gebiete = @ unternehmen.gebiete

@ area_contacts = AreaContact.includes (: area) .find_by_area_id (@ areas.ids)

render json: {company: @company,
Areas: @ areas,
area_contacts: @ area_contacts
}
The End

The problem is that it only brings up the first area_contact, no matter how many are related to the area_id that the query is brought to when I call the company. That is, if I consult the company id = 1, I bring all areas with company_id = 1, and should in turn bring all the area_contact related to the area_id that brought the request through company_id = 1, but only the first.

I think the problem is defined in this part of my code:

@ area_contacts = AreaContact.includes (: area) .find_by_area_id (@ areas.ids)

I appreciate any help or comment.