Displaying 20 results from an estimated 20000 matches similar to: "How to create a "like" button"
2010 Oct 01
20
Paperclip not executing FFMPEG properly
Im using a customs processor to run ffmpeg on a video to create a
thumbnail.
So far so good. Except when I do:
cmd = "-i #{@file.path} -f flv -s 320x240 ~/Downloads/foobar/q.flv"
success = Paperclip.run(''ffmpeg'', cmd)
Console is reporting:
ffmpeg ''-i /var/folders/uL/uL0bYOOZEZaJH5E+BmDJVE+++TI/-Tmp-/stream,
16824,1.mpeg -f flv -s 320x240
2010 Sep 08
4
OpenSSL
Hello anyone used OpenSSL before?
Why do we need to pay for expensive SSL certs when there is OpenSSL
which is provided free? Is there a difference?
I''ve got an ecommerce website, and wondering if OpenSSL is enough?
Your thoughts will be appreciated
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this
2010 Oct 11
12
Need advice on controller / view
Need some advice. I''ve got two modules: artists and paintings.
In my home page, I''ve got a 2nd page that says "Browse paintings",
which displays ALL paintings of ALL artists. This is being rendered by
paintings#index.
In another page, I should show all paintings of a specific artist
ONLY. Meaning, paintings from ONE artist. I cant use paintings#index
for this anymore
2010 Oct 12
2
STI and :through, not working?
Artist.first.medias returns all medias. Media is an STI. Media can be
video or painting.
How do I return all paintings of an artist? Only paintings, not
videos?
In my Artist model, I tried putting:
has_many :paintings, :through => :medias
In console, I do:
Artist.first.paintings.all
And I get:
ActiveRecord::HasManyThroughSourceAssociationNotFoundError: Could
not find the source
2013 Oct 27
5
run simple method from Helper on button click
Greetings,
I''m new to rails and currently having couple problems about how to add
javascript functionality into rails.
I have a simple method in the helper and i want to run this code on
button click.
------------------------------------------------------------------
module PagesHelper
def show_message
"simple output"
end
end
2010 Jul 06
4
how to make confirm boxes conditional?
Hi,
I''d like to make the :confirm option in my link_to/button_to erb
elements conditional. So, if the page is in some state, no
confirmation is requested, but not otherwise, etc.
So far, my only (ugly) approach is to replace the linker html itself
depending on changes in state, but I believe there must be an easier
way to ''toggle'' the confirmation option on/off.
Can
2010 Oct 15
1
Help with nested form: User and Artist
Artist is 1:1 with User. User has_one :artist
In my artist model, I have:
belongs_to :user
accepts_nested_attributes_for :user
However, in my artist _form, the name column from the user model does
not display. I am doing:
<% f.fields_for :user do |builder| %>
<p class="fields">
<%= builder.label :name %>
<%= builder.text_field :name %>
2010 Oct 08
1
How to access virtual attributes in the model
I''ve got an artist form. In this form I''ve got attributes that do not
exist in the model that the form belongs to. However, I would like to
submit these values for later processing.
My virtual attributes in the form are:
<%= f.label :foobar %>
<%= f.text_field :foobar %>
In the artist model, I created a getter:
def foobar
end
When the form is
2010 Feb 09
3
acts_as_tree question
Hi,
I''m trying to implement a very simple acts_as_tree search in my index
html.
I am able to show the parents, with no issue, but the children will
not show.
I have something like this for the parent, which displays fine:
<% for group in Group.roots %>
<td>
<tr>
<a href="#" onclick="Effect.BlindDown(''show_<%=
2013 Feb 22
7
Newbie Question
What are some Great resources to get into Rails?
Keep in mind this is for someone that has little to no programming
experience.
So starting from scratch...
A little background is that I want to create a program for personal use
that uses Databases to store lots of information. They wopuld draw from
each other and work to help in large scale event planning and management.
Any help is
2010 Mar 09
9
Ajax-submit form on "check box onclick ": why this error?
Hi there,
I need to have a checkbox which ajax-submits a form.
The following code throws an error "index 112009 out of string". What''s
wrong here?
==============================================
<% form_remote_tag :url => { whatever_url } do -%>
<%= check_box_tag ''whatever'', nil, whatever, { :onclick =>
2010 Feb 22
10
Error: "ActionController::InvalidAuthenticityToken"
Hi there,
I have my first Rails app running and I regularly get the following
"logged_exception" error message:
"ActionController::InvalidAuthenticityToken"
Has anybody an idea what might cause this problem? Could it somehow be a
"time out" error (like an "AuthenticityToken" which might expire after a
certain time, or something along those lines)?
Any
2010 Aug 31
6
ajax and partials
Hello all,
I am still very new to programming and wonder if I could get some help.
I have tried to figure this out myself but still having trouble with
some of the concepts. I’ll do my best to explain the problem and
include the code. I may be completely off track, so ANY direction
offered would be deeply appreciated.
I have a question model / object which consists of a question, answers,
and
2011 May 13
2
Popup window
How can I insert (:popup => true) into code below?
<%= link_to "Source_#{i}", link.url , :style => "color:#0096FF;font-
family:''LucidaGrande'',''Lucida Grande'',''Lucida Sans Unicode'',sans-
serif; font-size: 11px; text-decoration: none; margin-right: 10px;" if
link.show? %>
--
You received this message because you
2012 Dec 08
9
link_to popup
Hello All,
I have a link. Which I want to open as a new window :-
<%= link_to "Google", "https://www.google.com", :popup =>
[''new_window_name'',''toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes'']
%>
But it is opening in the same page....
Any suggestions how to do it ??
Even hover will be
2010 Mar 24
4
grouping and acts_as_tree
hi,
im using acts_as_tree and im not sure on how to group find-result.
x = find.almost_all
<p>
<% for y in @x.ancestors.reverse %>
<%= link_to h(y.title), page %> >
<% end %>
</p>
gives me a nice "breadcrum". but how is it possible to group the list lets
say by the 1level or second level?
thx
--
You received this message because you are
2011 Jul 27
20
Rails, jquery and Ajax
How do I make an ajax call and then update a div with a partial? I''ve
tried this but it''s not working. Comment is created but the partial is
not loaded.
//view
<a href="#" id="testlink">Testlink</a>
<div id="commentlist">
</div>
//controller
def new
@comment = Comment.new
@comment.save
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here:
http://wiki.developers.facebook.com/index.php/Facebook_Styles
I included testing and comments. I hope you find it useful.
Curiously, it''s really a small extension of FBML.
Richard
-------------- next part --------------
Index: test/rails_integration_test.rb
2012 Oct 26
7
How to use Ajax with rails ?
Hi all,
Can any one tell me how to use Ajax with Rails.
Send me quick start up link and videos.
Thanks
Regards
Fahim Babar PAtel
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this
2008 Dec 19
14
Can duplicate "back" browser function in Rails?
In Rails I have a DB Table index.html.erb view. It has 100''s of items.
When I gen via scaffold I get index, show, edit, update, etc view.
But when I page down several pages, use the "show" link and then the
"back" link I do not go back to where I was on the index view.
Instead, I go back to the TOP of the index not the place where I clicked
on the "show"