Hello,
I'm trying to create a find statement that should find an element
which start_date and end_date are within Time.now. If I for example
have an object with a start_date of 2011-05-04 and end_date of
2011-05-19, the find statement should find the elment(s) that are
within that time peroid. My
}'.
Thanks!
// Anders
On May 8, 5:13 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
On 8 May 2011, at 13:58, Anders_P and...@andersplanting.se wrote:
Hello,
I'm trying to create a find statement that should find an element
which start_date and end_date are within Time.now. If I
Thanks for the tip, got a bit cleaner.
On May 8, 8:02 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
On 8 May 2011, at 18:51, Anders_P and...@andersplanting.se wrote:
Thanks for your answer, I think I got it to work.
def current_tee
current_time = Time.now
@current_tee
Hello!
I'm trying to make a simple test. I have a coming soon page with a
field where users can submit their emails. When the users clicks
submit it should create a new record in the database. I Have two
controllers:
class PagesController ApplicationController
def home
Ouch embarrassing. :D
Thanks!
On 23 Apr, 22:15, Frederick Cheung frederick.che...@gmail.com wrote:
On Apr 23, 8:58 pm, Anders_P and...@andersplanting.se wrote:
Hello!
And:
class NewsletterReceiversController ApplicationController
def create
@newsletter_receiver
Thanks Colin!
You found the root of my problem, the invoice/id was wrong. And thanks
for the tips regarding Ruby-debug. Still has a lot to learn. :D
// Anders
On 7 Dec, 22:35, Colin Law clan...@googlemail.com wrote:
On 7 December 2010 21:03, Anders_P and...@andersplanting.se wrote
Hello!
I'm trying to integrate PayPal into my (first) Rails app. I've been
looking at RailsCast #142,
http://railscasts.com/episodes/142-paypal-notifications.
But I don't get it to work. My app isn't a normal e-commerce site,
it's a buy and sell site. Every ad has a 'published' boolean, which I
Hi!
Thanks for your help. I took the Devise route, it was a bit of hassle
but it works now.
Thanks
// Anders
On 31 Okt, 23:09, Peter De Berdt peter.de.be...@pandora.be wrote:
On 31 Oct 2010, at 22:52, Colin Law wrote:
I'm working on my first Rails app and I have a question regarding
Hello!
This is probably something easy. I've looked at some documentation but
I didn't find any good resources on how to change to default locale
file with Devise authentication plugin. Should I do it in my
application controller or should I change something in Devise? And how
should I do it.
Hello!
I'm working on my first Rails app and I have a question regarding
authentication. I already have authentication for signing up, logging
in, logging out, etc. What I need is an account email activation
function and a reset password (forgot password) function. I have read
a little bit about
.
Walter
On Oct 15, 2010, at 4:05 PM, Anders_P wrote:
I'm getting this error from Firebug.
uncaught exception: Page Type could not be determined, please amend
this lightwindow
URLhttp://localhost:3000/system/images/301/original/tufftroja_19225958.j...
I use Paperclip for uploading
Hi again!
Sorry, newbish misstake. I had forgotten to replace my old prototype
file with the file from lightwindow, so now it works!
Thanks again!
// Anders
On 19 Okt, 18:06, Anders_P and...@andersplanting.se wrote:
Thanks, that seemed to work. But I ran into another problem. The
effect
Hello!
I'm trying to create a simple image popup effect using Lightbox2,
http://www.huddletogether.com/projects/lightbox2/. But I don't get it
to work. My code looks lite this:
span class=ad_image
a href=%= ad.image.url(:thumb) % rel=lightboximg src=%=
ad.image.url(:thumb) % //a
/span
This
does the initial hookup.
Walter
On Oct 15, 2010, at 11:24 AM, Anders_P wrote:
Hello!
I'm trying to create a simple image popup effect using Lightbox2,
http://www.huddletogether.com/projects/lightbox2/. But I don't get it
to work. My code looks lite this:
span class=ad_image
, 2010, at 11:58 AM, Anders_P wrote:
class=lightbox
--
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-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk
, 2010, at 11:58 AM, Anders_P wrote:
class=lightbox
--
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-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk
getting any errors?
Walter
On Oct 15, 2010, at 1:47 PM, Anders_P wrote:
Hi,
I think we were talking about different modal window plugins. But I've
changed to LightWindow now, it seems much better.
I'm now getting the same output as you from my source code,
span class=ad_image
Hello!
I'm trying to create a menu. I have a controller that takes two
attributes, like this:
def category(gender, category)
@ads = Ad.find_all_by_gender_and_category(gender,
category).paginate(:page = params[:page])
@title = Startsidan
render 'home'
end
And in my view I have a list with
get any errors, but it doesn't find anything. Any idea on what
might be wrong?
// Anders
On 9 Okt, 17:23, David Kahn d...@structuralartistry.com wrote:
On Sat, Oct 9, 2010 at 7:41 AM, Anders_P and...@andersplanting.se wrote:
Hello!
I'm trying to create a menu. I have a controller that takes
...@structuralartistry.com wrote:
On Sat, Oct 9, 2010 at 11:13 AM, Anders_P and...@andersplanting.se wrote:
Hi! Thanks for your help. But I still doesn't get it to work. I've
changed the controller action so it looks like:
def category
gender = params[:gender]
category = params[:category]
@ads
Thanks for your tips, I think I will follow your suggestion and create
a new model 'Category', think it will get a lot cleaner.
Thanks.
// Anders
On 9 Okt, 19:37, David Kahn d...@structuralartistry.com wrote:
On Sat, Oct 9, 2010 at 12:17 PM, Anders_P and...@andersplanting.se wrote:
Hi
Hello!
I have a systemwide search field with a submit button (submit_tag).
Like so:
%= submit_tag Search %
I wonder if there is a way to link to a chosen path when the user
presses the submit button, in my case to the root_path. Or should i
use something else instead of 'submit_tag'?
I have
id=search
%= link_to(Show All) if params[:q] %
%= text_field_tag :q, params[:q] %
%= submit_tag Search, :name = nil, :id = 'search_submit' %
/div
% end %
Walter
On Oct 3, 2010, at 8:33 AM, Anders_P wrote:
Hello!
I have a systemwide search field with a submit
on JavaScript on the client
to keep from submitting the default value. Be sure to check in your
controller for that explicit value and ignore the search event in that
case.
Walter
On Oct 3, 2010, at 12:18 PM, Anders_P wrote:
Thanks a lot! That worked.
Do you have any tips on my second
Hello!
I'm trying to create a user update action, and I want to check so that
the user has entered his correct old password before changing it. I've
been googeling for a while but I can't find any good tips.
I'm thinking of adding a 'old password' column to my User model but I
don't know if
of your so params[:id] has nothing in it
thats why Couldn't find User without an ID
On Sat, Sep 11, 2010 at 2:08 PM, Anders_P and...@andersplanting.se wrote:
Thanks for your tips Colin!
Hi radhames!
Thanks for your help on my previous topic.
Here is my routes.rb file:
resources
, 2010 at 7:48 AM, Anders_P and...@andersplanting.se wrote:
Hi radhames!
So the problem lies in my routes!?!, do you have any suggestion on how
it should look?
Thanks!
// Anders
On 12 Sep, 04:48, radhames brito rbri...@gmail.com wrote:
ok there is a problem
@user = User.find
Hello!
I'm trying to create a list of user ads on my home page in my app.
But I don't get it to work. I'm a rails noob so it might be something
trivial.
I'm currently running into this error:
Couldn't find User without an ID
My pages controller where to home action is looks like this:
def
, 12:43, Colin Law clan...@googlemail.com wrote:
On 11 September 2010 11:34, Anders_P and...@andersplanting.se wrote:
Hello!
I'm trying to create a list of user ads on my home page in my app.
But I don't get it to work. I'm a rails noob so it might be something
trivial.
I'm currently
to be a member restful action and it needs an id to find
the record but you are not declaring that route the right way
show the routes please
On Sat, Sep 11, 2010 at 8:25 AM, Colin Law clan...@googlemail.com wrote:
On 11 September 2010 12:14, Anders_P and...@andersplanting.se wrote:
Could
Hello!
I'm trying to create a partial for flash messages and render it to my
views, but I don't get it to work. My code looks like this:
# _flash.html.erb
% flash.each do |key, value| %
%= content_tag(:div, value, :class = flash #{key} body_copy
box_padding) %
% end %
And in my views:
Thanks! That worked.
--
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-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
For
Hello!
I wonder if it's possible to simulate Paperclip's has_attached_file
with Factory Girl and then test it with Rspec. I don't get it to work.
My factories.rb file looks like this:
Factory.define :user do |user|
user.name Anders
user.email u...@example.com
I solved it by defining :avatar_file_name in attr_accessor in my user
model. Don't know if it's the best solution, comments?
--
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
34 matches
Mail list logo