Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

usmanarif's Profile

GitHub User: usmanarif

Comments by

Avatar

Hello all, Is there any demo application of implementing Riak database using Risky library in Rails application? I've googled alot but didn't find any. Even there is no episode in railscast for the same.

Avatar

Hello all, Is there any demo application of implementing Riak database using Risky library in Rails application? I've googled alot but didn't find any. Even there is no episode in railscast for the same.

Avatar

Can anyone help me out in this. I am using dynamic fields to generate the ranges. It all working fine but now I have to put some validation over it, and have to do it on Client side. Now I have spent three valuable days to find out the answer but yet not successful. Is there any way to generate my own predecided id to each dynamic text field instead of current date and time? So that I can do the validation using that Id. Or do any one have any better idea? Any type of help will be appreciated. Thanks in advance.

Avatar

Can anyone tell me how to do the client side validation in dynamic text fields. How to validate for presence_of for the dynamic text field so that at least one dynamic text field must be present in the form.

Avatar

Hello, I have to clone the image which I have created previously. I am just copying the data present at the image column into my cloned deal image column but this didn't displaying any image. The code is as follows:

Offer.rb

has_attached_file :image,
:styles => {
:thumb=> "100x100>",
:small => "150x150>",
:medium => "300x300>",
:large => "400x400>"
}

Offer_controller

def clone_deal

@deal = Offer.find(params[:id])
@attr = { :nameofdeal => @deal.nameofdeal, :value => @deal.value, :image_file_name => @deal.image,:type => 'image/png'}
@offer = Offer.new(@attr)

Offers/show.html.erb

<% if @offer.image_file_name != nil %>
<%= image_tag @offer.image(:large),:class=>"offer_deal_image" %>

<% end %>

Avatar

Is there any way to get the value of dynamically added text fields( not just the value of one text field) before saving it in my database? I have searched it in google but found no clue. Can any one help me? Thanks in advance.

Avatar

On using the above procedure, I get the following error message:

undefined method `error_message' for #ActionView::Helpers::FormBuilder:0x9fa7f54

Can anyone help me?? Thanks in advance..!!

Avatar

Bad Luck..Date picker is coming but still the values are changing only in the first text field only...every other text fields remain empty....!!! Is anyone out there can help me???

Avatar

Thanx 'ed'..Your code for dynamic date fields really helped me...I've lost my 1 week over this....Thank you..!!

Avatar

I have three queries:

1) How do I assign and get the unique Id to each text box generated dynamically?

2) How do I resolve the conflict occur between jquery of datepicker and the code <%= javascript_include_tag "application" %>

3) How can I use datepicker function in each text box as datepicker uses the unique Id of each text box.