Ruby | Ruby on Rails Answers

Questions: 15

Free Answers by our Experts: 3

Ask Your question

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Tom, Dick and Harry go to a restaurant. Each of them has a certain amount of money. When their monies are pooled they discover they have S Rs. Next, they start going through the menu card to choose items they would like to order. Your task is to help them find out how many different menu item combinations they can order. Since there can be many menu items with the same price, we are interested only in unique price combinations. Refer output specifications and examples to get a better understanding. Constraints: Pi > 0 ; where i = 1 to N and Pi denotes the price of the ith item S > 0 i need a code .......
i have some doubts regarding OR EQUALS operator in ruby. how does ruby interpreter is implementing it.? here is sample code class C def arr @num ||= [] end when we use or equals operator in this circumstance.first call to this method initializes it and added a element thats fine.how does it know when a second call to made to arr is done that array has one elemnt in it..
Can you help me with implementation CarrierWave in Rails I had an error it says that NoMethodError in HomeworksController and here my HomeworksController class: class HomeworksController < ApplicationController before_action :signed_in_user, only: [:create, :destroy] before_action :correct_user, only: :destroy def create @homework = current_user.homeworks.build(homework_params) if @homework.save flash[:success] = "Homework created!" redirect_to root_url else @feed_items = [] render 'static_pages/home' end end def new @homework =Homework.new end def destroy @homework.destroy redirect_to root_url end def index @homeworks=Homework.all end private def homework_params params.require(:homework).permit(:content, :attachment) end def correct_user @homework = current_user.homeworks.find_by(id: params[:id]) redirect_to root_url if @homework.nil? end end
What type(s) of programming is needed to pull live pricing data from sites such as Amazon, Best Buy, Wal-Mart, Target, etc. and display those prices on your own site?
I have a project on ruby on rails. 1) I don't know if this project is in just ruby or it is in rails? 2) It seems that rack file is missing in that project I want to know that if it is true or false?
I tried PaperClipExample and it is working fine. I use s3 to store images. And i want to know how the images are displayed. To say exactly, i have pic_file_name pic_content_type pic_file_size pic_updated_at in the user model. I do not have url of the pic in the model, then how can i able to get the images using <%= image_tag @user.pic.url %>
I am new to rubyonrails and i would like to know from where to start learning. And what source would be more efficient to learn.
I having 2 tables client and group. Between them many to many HABTM relationship exist, which i already define using simple join table. I having a problem with the Active record query interface . I have to write code for adding client to group and whenever i select any group display all the clients related to this group.
List out two gems/plugins which are extremely useful also what are their use?
I have a controller action which is taking 10 seconds to run. Most of the time is being spent in a view which is a large file.(more than 1500 lines). How shall I go about debugging the speed issue?
LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal