Thanks Marnen!
I will surely look into back references next time. Before I got your
answer, I managed to do this manually by replacing Spec then spec when
preceded with each of the special characters: @ : ' / - ! space. I
downloaded and used Name Mangler to replace spec in file names. While
We have about a dozen enhancements for a high-profile, highly-
trafficked website that was written almost exclusively in Ruby on
Rails. However previous project posts on guru.com and other sites have
failed to produce a large number of applicants (let alone qualified
applicants). Can anyone in
2010/1/27 lunaclaire szager...@gmail.com:
First the data model:
class Forum ActiveRecord::Base
has_many :topics, :dependent = :destroy, :order =
'created_at
desc'
end
class User ActiveRecord::Base
has_many :topics, :dependent = :destroy
On Jan 27, 6:23 am, Hemant Bhargava li...@ruby-forum.com wrote:
But how can i do it? Where does rails do it? I want to write a summary
like user with session id is accessing page ABC, have taken abc time..
etc etc. in a sinle line of log files ..
By default log files go into your app's log
2010/1/26 Vincent P ease...@gmail.com:
How can I test that a view does not display a particular string any
where?
E.g., the particular string is I should not be here. In my
controller test, I have:
assert_select div, /I should not be here/, false
assert_select div, {:text = /I should not
On Jan 26, 10:05 pm, Alpha Blue li...@ruby-forum.com wrote:
I've written a complete custom built gui search engine in C++, and I'm
also in the process of building a new GUI search engine for ruby. In
order to understand google's references, you have to look at their API.
Hey,
If i have a function in my model:
def mark_sold
self.update_attribute(:market_status, 'sold')
end
Is it possible for this to be called via an on page link?
Then I'd like to ajax it so a user could just scroll down a list
clicking all links to mark as sold as he comes across old
On Jan 27, 9:16 am, radu puspana radupusp...@gmail.com wrote:
It seems pretty simple but it's not. You should make sure that you
enforce URI encoding standards when submitting your URLs.
What does this mean You should make sure that you enforce URI
encoding standards when submitting your
Quoting brianp brian.o.pea...@gmail.com:
Hey,
If i have a function in my model:
def mark_sold
self.update_attribute(:market_status, 'sold')
end
Is it possible for this to be called via an on page link?
Then I'd like to ajax it so a user could just scroll down a list
clicking
Thanks Jeffrey,
I had a good feeling this is how it needed to be done. But felt like I
was bloating my controller. Now I'm happy knowing I was originally
going in the right direction.
Thanks again.
brianp
On Jan 27, 2:10 am, Jeffrey L. Taylor r...@abluz.dyndns.org wrote:
Quoting brianp
2010/1/27 Vishwa Rao li...@ruby-forum.com:
Thank you. Yes 'assert_session_has' and 'assert_session_has_no' has
been replaced by 'assert_nil session'
Now I am getting another error:
Error:
test_bad_signup(UserControllerTest):
NoMethodError: You have a nil object when you didn't expect
Hey,
I'm almost done a project and only now am I implementing friendly
URLs. I'm using the method from Simply Rails 2 by Patrick Lenz.
This involves the following addition to the model:
def to_param
#{id}-#{name}.gsub(/\W/, '-').downcase
end
So every time a url
Hi Gurus,
I want to globalize my project using tzinfo. I want to:
1. use tzinfo to globalize my app.
2. the app is already developed, so what is the accurate solution to
implement it using minimal and centralize change.
3. I have heard that tzinfo have some issues
I can't start webrick from the command line. always have this error
below. Some one help, please.
C:\Users\imedia1\applicaruby script/server
= Booting WEBrick
= Rails 2.3.5 application starting on http://0.0.0.0:3000
= Call with -d to detach
= Ctrl-C to shutdown server
[2010-01-25 13:45:26]
is IIS already installed?
Regards,
Pavan Agrawal
On Wed, Jan 27, 2010 at 2:48 PM, kevid alumsimport...@yahoo.ca wrote:
I can't start webrick from the command line. always have this error
below. Some one help, please.
C:\Users\imedia1\applicaruby script/server
= Booting WEBrick
= Rails
thank you this was the trick
On Jan 26, 6:15 pm, Simon Macneall macne...@gmail.com wrote:
Seehttp://guides.rubyonrails.org/migrations.html, particularly the
change_column command
Simon
On Tue, 26 Jan 2010 17:11:41 +0800, eggie5 egg...@gmail.com wrote:
I have a column in a postgres
i got two controller (with restful actions) where my code is quite
ugly and not very dry. every action looks quite like this:
if @logged_user.has_role?(admin)
User.find(params[:id)
else
@logged_user.group.user.find(params[:id])
this is a security check that enforce a simple spec: normal user
On 27 Jan 2010, at 11:32, eugenio wrote:
i got two controller (with restful actions) where my code is quite
ugly and not very dry. every action looks quite like this:
if @logged_user.has_role?(admin)
User.find(params[:id)
else
@logged_user.group.user.find(params[:id])
this is a
jobs.rubynow.com
On Tue, Jan 26, 2010 at 5:20 PM, BCK in2is...@gmail.com wrote:
We have about a dozen enhancements for a high-profile, highly-
trafficked website that was written almost exclusively in Ruby on
Rails. However previous project posts on guru.com and other sites have
failed to
Hi there,
I'm posting because I didn't find the answer using search engines:
How do I get the name of the action and/or controller that have sent the
user to the current page?
(I know one can access the *current* action/controller using
controller.controller_name and controller.action_name, but
Given those relationships, you should be able to use
current_user.contact.site_id.
On Jan 26, 5:01 pm, JohnMerlino stoici...@aol.com wrote:
Hey all,
I keep getting the following error:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error
Can you show us the code that is not working?
Make sure you have the relationship specified in your model so Rails
knows it's there. so you should have
class Project ActiveRecord::Base
belongs_to :user
end
so that you can do:
Project.new :user = @user
or
Project.new :user_id = 12
and then
For the record, our problem was sitting with the firewall between the app
box and the mysql box.
There seems to be a 4000 seconds timeout on any TCP connection passing
through the firewall
I followed the steps detailed here :
site has many contacts through a polymorphic relationship:
relationship between tables:
users: contact_id
contact: primary key, contactable_id, contactable_type
site: primary key
student: site_id
User model
belongs_to :contact
Contact model
has_one :user
belongs_to :contactable,
I'm looking into interacting with a Microsoft exchange server with
ruby. Any pointers? It seems not promising, i can't seem to find
anything good. Maybe I'm looking in the wrong places... Any pointers?
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
The problem I reported above was solved simply by updating the
exceptional plugin from version 0.0.2. (!) to 2.0.7.
Posting this here in case someone else has failed at keeping their gems
up-to-date when upgrading to Rails 2.3.
--
Posted via http://www.ruby-forum.com/.
--
You received this
LOLCATS
On Tue, Jan 26, 2010 at 8:42 PM, Krishnaprasad Varma
krishnaprasadva...@gmail.com wrote:
LinkedIn
Krishnaprasad Varma requested to add you as a connection on LinkedIn:
Mitin,
I'd like to add you to my professional network on LinkedIn.
- Krishnaprasad
Hi,
does anyone knows an application (hopefully on rails) which deals with file
transfer and management. I mean in the sense of an FTP.
My problems are that the client has only access to HTTP (port 80) and all
the tools (like DMS, etc.) out there (like knowledgetree, etc.) are heavy
(PHP) monsters
On Jan 27, 11:16 am, radu puspana radupusp...@gmail.com wrote:
On Jan 26, 10:05 pm, Alpha Blue li...@ruby-forum.com wrote:
I've written a complete custom built gui search engine in C++, and I'm
also in the process of building a new GUI search engine for ruby. In
order to understand
On Jan 27, 11:16 am, radu puspana radupusp...@gmail.com wrote:
On Jan 26, 10:05 pm, Alpha Blue li...@ruby-forum.com wrote:
I've written a complete custom built gui search engine in C++, and I'm
also in the process of building a new GUI search engine for ruby. In
order to understand
Thanks guyz.. Resolved it ..
Actually rails already provide this thing.. I mean using debug params,
you can find out that what parameters coming.. And the based upon those
parameters you can find out whatever you want.. Say like you want the
action name then type just params[:action] and you'll
and do you know a link on how to buid links using raisl, like the one
i need?
On Jan 27, 11:31 am, Frederick Cheung frederick.che...@gmail.com
wrote:
On Jan 27, 9:16 am, radu puspana radupusp...@gmail.com wrote:
It seems pretty simple but it's not. You should make sure that you
enforce
1 class UserController ApplicationController
2 before_filter :login_required, :only= ['welcome', 'change_password',
'hidden']
3
4 def signup
5@user = User.new(@params[:user])
6if request.post?
7 if @user.save
8session[:user] = User.authenticate(@user.login,
What type of payment system are you using? IPN?
If so, then once the payment reaches the payment gateway and the customer
finishes paying, you check the status of the payment received and if
successful, you change the subscription based off the amount(s) received.
You are supplying information
Seirie wrote:
If it helps any, I'm attempting to build an app that utilizes the
twitter API. I know ppl have built tools for the interfacing with the
twitter API specifically, but I'd rather deal with it myself using
classic XML parsing.
Don't reinvent the wheel. Use a Twitter library. I
kevid wrote:
I can't start webrick from the command line. always have this error
below. Some one help, please.
C:\Users\imedia1\applicaruby script/server
= Booting WEBrick
= Rails 2.3.5 application starting on http://0.0.0.0:3000
= Call with -d to detach
= Ctrl-C to shutdown server
I am trying to use exception_notification but I get this error:
$ script/server
= Booting Mongrel
= Rails 2.3.4 application starting on http://0.0.0.0:3000
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_re
quire': no such file to load -- action_dispatch
On Jan 26, 6:41 pm, Pablo Gonzalez li...@ruby-forum.com wrote:
I'm trying to use the :group option in an ActiveRecord association. I
wrote the code as follows:
class User ActiveRecord::Base
has_many :messages, :group = thread, :order = created_at desc
end
It works fine as it returns
I think you're right. I've been looking for that solution and I didn't
find anything really solving it. So I guess I must figure out another
approuch, perhaps giving a default value for thread.
Thank you anyway.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because
Test this out in IRB so you can see what happens:
irb
require 'cgi'
puts CGI.escape( J.R.R. Tolkien )
puts CGI.escape( Jack Daniels )
You can create a simple helper file that does the formatting for you and
then use a simple link_tag method to submit the link to google with the
helper.
If you
Open a command prompt from windows and run the following command:
netstat
This will show you what is currently open.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send
Telnet.
http://ruby-doc.org/stdlib/libdoc/net/telnet/rdoc/index.html
Sincerely,
Joel Dezenzio
Website Bio: http://jdezenzio.com/
Rails Production Sites: http://ncaastatpages.com
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post
Still no idea? I must admit I don't have but maybe you can see
something...
--
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
You can't directly find the referring action/controller, but you can get the
referring URL.
request.referrer
The problem in trying to determine the referring action from this is you have
no knowledge of the verb used on the referring URL. For example /products
could be the products index
CiriusMex wrote:
Still no idea? I must admit I don't have but maybe you can see
something...
It hasn't even been 24 hours since your last post. Be patient.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via http://www.ruby-forum.com/.
--
You received this
thx again for your time JD.
I did dry the code snippets you gave me, and i also searched the web
for the methods of CGI, and couldn't find it anywhere, including on
railsguides.com and at railsapi.com, which served me fine up till now.
where should i get the fucntions for CGI? Can ri show them to
Thanks, Niels!
--
Posted via http://www.ruby-forum.com/.
--
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
Seirie wrote:
Hey guys. Does anyone know where I can find a good tutorial or example
on how exactly to work with XML in Rails. Now, I know the different
technologies you can use (REXML, Builder, etc) and I know how do use
these to parse through and create documents...where I specifically
have
Hey all
I just installed restful_authentication in a new project and have run
it's specs. I'm getting a few failures. Just looking at the first, i
can't understand why it's failing - can anyone see?
#failing line from test
route_for(:controller = 'users', :action = 'update', :id =
'1').should
I have two tables: 'owner_changes', 'tasks'
'tasks' has a primary key of 'id'. 'owner_changes' uses a 'task_id'
foreign key to relate the tables. 'owner_changes' contains records for
every instance of a task owner change. 'owner_changes' also houses a
'comment' column to store any comments one
Pale Horse wrote:
I have two tables: 'owner_changes', 'tasks'
'tasks' has a primary key of 'id'. 'owner_changes' uses a 'task_id'
foreign key to relate the tables. 'owner_changes' contains records for
every instance of a task owner change. 'owner_changes' also houses a
'comment' column to
Marnen Laibow-Koser wrote:
Use :order to put the records into the order you want. Unless you do
that, the DB will return records in an unpredictable sequence.
If I've not been clear enough in my description, which is likely, please
specify what you'd like me to elaborate on.
Best,
--
Could you not top post please, it is easier to follow a thread if you
insert your comments inline
2010/1/27 Vishwa Rao li...@ruby-forum.com:
1 class UserController ApplicationController
2 before_filter :login_required, :only= ['welcome', 'change_password',
'hidden']
3
4 def signup
5
Max Williams wrote:
Hey all
I just installed restful_authentication in a new project
Do yourself a favor and take it right back out again. Restful_auth is
based on unmaintainable, untestable generated crap code; it has no place
in today's Rails ecosystem. Use Authlogic instead, which is
just tested my code in my last post and worket like a charm :)
a zillion thx to JD :D
So i guess i'm kinda ready for this type of event huh? :)
all my best,
radu
On Jan 27, 6:40 pm, radu puspana radupusp...@gmail.com wrote:
thx again for your time JD.
I did dry the code snippets you gave me,
What is the repository for the ActiveRecord adapters?
I'll need to update the Informix adapter.
Thanks in advance.
--
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
On Jan 26, 10:05 pm, Alpha Blue li...@ruby-forum.com wrote:
I've written a complete custom built gui search engine in C++, and I'm
also in the process of building a new GUI search engine for ruby. In
order to understand google's references, you have to look at their API.
Thanks Marnen, AuthLogic does look good actually.
--
Posted via http://www.ruby-forum.com/.
--
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
Pale Horse wrote:
Marnen Laibow-Koser wrote:
Use :order to put the records into the order you want. Unless you do
that, the DB will return records in an unpredictable sequence.
If I've not been clear enough in my description, which is likely, please
specify what you'd like me to
On Jan 27, 2010, at 2:39 AM, brianp wrote:
Hey,
I'm almost done a project and only now am I implementing friendly
URLs. I'm using the method from Simply Rails 2 by Patrick Lenz.
This involves the following addition to the model:
def to_param
#{id}-#{name}.gsub(/\W/,
What are you trying to do? Retrieve email? Or do some sort of system
management?
On Wed, Jan 27, 2010 at 8:31 AM, eggie5 egg...@gmail.com wrote:
I'm looking into interacting with a Microsoft exchange server with
ruby. Any pointers? It seems not promising, i can't seem to find
anything good.
I was just providing an example of how queries are formed. Here's a
quick and dirty test for you for the author find:
def find_author(author)
require 'cgi'
cgi_author = CGI.escape(author)
q_author = cgi_author.gsub(/\+/, '+author:') + ' '
query = http://www.google.com/groups?q=author:;
Right, sorry, I'm just going mad trying to figure this out ;)
On 27 ene, 10:40, Marnen Laibow-Koser li...@ruby-forum.com wrote:
CiriusMex wrote:
Still no idea? I must admit I don't have but maybe you can see
something...
It hasn't even been 24 hours since your last post. Be patient.
Excellent, all good advice, thanks guys.
On Jan 27, 11:47 am, Marnen Laibow-Koser li...@ruby-forum.com wrote:
Seirie wrote:
Hey guys. Does anyone know where I can find a good tutorial or example
on how exactly to work withXMLin Rails. Now, I know the different
technologies you can use
On Jan 27, 7:46 pm, Alpha Blue li...@ruby-forum.com wrote:
I was just providing an example of how queries are formed. Here's a
quick and dirty test for you for the author find:
def find_author(author)
require 'cgi'
cgi_author = CGI.escape(author)
q_author = cgi_author.gsub(/\+/,
On Jan 27, 7:46 pm, Alpha Blue li...@ruby-forum.com wrote:
I was just providing an example of how queries are formed. Here's a
quick and dirty test for you for the author find:
def find_author(author)
require 'cgi'
cgi_author = CGI.escape(author)
q_author = cgi_author.gsub(/\+/,
I believe you will have to learn about associations (or relationships
between tables, as another post has already noted). Look into
'belongs_to' and 'has_*' relationships (probably 'has_one' or
'has_many'). That will most likely teach you what you need.
On Jan 26, 7:16 pm, Souschef
Colin Law wrote:
Could you not top post please, it is easier to follow a thread if you
insert your comments inline
2010/1/27 Vishwa Rao li...@ruby-forum.com:
9 flash[:message] = Signup successful
10 redirect_to :action = welcome
11 else
12 flash[:warning] =
CiriusMex wrote:
Right, sorry, I'm just going mad trying to figure this out ;)
Understood. I haven't had time to look closely at your routes, except
to notice that you probably have *far* too many of them. Did you just
make a controller and a map.resources line for every model whether you
Actually yes, I should clean this you're right, I'm going to check it.
On 27 ene, 13:57, Marnen Laibow-Koser li...@ruby-forum.com wrote:
CiriusMex wrote:
Right, sorry, I'm just going mad trying to figure this out ;)
Understood. I haven't had time to look closely at your routes, except
to
On Jan 26, 2:36 pm, CiriusMex cirius...@gmail.com wrote:
Quite right. What's the output from rake routes?
Ok, it's quite big so I hope it won't be anoying, I put all of it:
As a reference, the urls redirect_to :controller =
'pizarro', :action = 'logout', :id = 0 and redirect_to :controller
On Jan 26, 2:36 pm, CiriusMex cirius...@gmail.com wrote:
Quite right. What's the output from rake routes?
Ok, it's quite big so I hope it won't be anoying, I put all of it:
As a reference, the urls redirect_to :controller =
'pizarro', :action = 'logout', :id = 0 and redirect_to :controller
� q_author = cgi_author.gsub(/\+/, '+author:') + ' '
what does this line do? I know gsub will replace the +author text with
something that comes out from /\+/ (althought i don't know what this
regwxp could generate)
gsub is used for substitution. Unlike sub which only substitutes the
first
pharrington wrote:
On Jan 26, 2:36�pm, CiriusMex cirius...@gmail.com wrote:
welcome :)
ROUTES BE HERE
Google groups cut out my last message, so I'll repost in case any
other readers were finnicky about it...
Could you please reupload this to pastebin or something similar?
I strongly
That being said, routes are generated/matched in the order they are
defined in routes.rb. SO, when generating a route with url_for/
redirect_to/whatev :controller = 'pizarro', :action = 'logout', :id
= 0, /:controller/:action gets matched before
/:controller/:action/:id. (remove the
On Jan 27, 3:45 pm, CiriusMex cirius...@gmail.com wrote:
That being said, routes are generated/matched in the order they are
defined in routes.rb. SO, when generating a route with url_for/
redirect_to/whatev :controller = 'pizarro', :action = 'logout', :id
= 0, /:controller/:action gets
CiriusMex wrote:
That being said, routes are generated/matched in the order they are
defined in routes.rb. SO, when generating a route with url_for/
redirect_to/whatev :controller = 'pizarro', :action = 'logout', :id
= 0, /:controller/:action gets matched before
/:controller/:action/:id.
On Jan 27, 3:45 pm, CiriusMex cirius...@gmail.com wrote:
That being said, routes are generated/matched in the order they are
defined in routes.rb. SO, when generating a route with url_for/
redirect_to/whatev :controller = 'pizarro', :action = 'logout', :id
= 0, /:controller/:action gets
I restarted the server after doing the changes, and I have others
application on the same server working correctly too...It's quite a
mistery as I can't figure out what is the difference between those
others applications and this one. In my local machine the rails and
ruby versions are different,
On Jan 27, 4:00 pm, CiriusMex cirius...@gmail.com wrote:
In my local machine the rails and
ruby versions are different, older ones
This is pretty relevant!
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send
On 27 ene, 15:04, pharrington xenogene...@gmail.com wrote:
On Jan 27, 4:00 pm, CiriusMex cirius...@gmail.com wrote:
In my local machine the rails and
ruby versions are different, older ones
This is pretty relevant!
Yeah I agree but as others application on the same server are working
I
Hi all
To make my error pages more user-friendly I'm rendering my error
messages (404, 500 etc) using the site's layout. To do this I'm using
rescue_from as below:
rescue_from Exception, :with = :server_error
rescue_from ActionController::RoutingError,
ActiveRecord::RecordNotFound, :with =
2010/1/27 Vishwa Rao li...@ruby-forum.com:
Colin Law wrote:
...
I got another error on the line
assert_invalid_column_on_record user, login
So I googled and found that it is deprecated and hence suggested using:
assert(find_record_in_template(user).errors.invalid?(:password))
When I use
I am just trying to have the current_user only view students from his or
her site. I wrestled with this many times and others say this should
work but it only returns an empty set:
StudentsController
def index_scoper
if current_user.role_id == 8
if current_user.contact and
Hi,
I have a rails site hosted in a mediatemple DV plan. I am not using
mongrels as web server, instead i am using passenger and it works
great.
Now what i want to do, is to host a PHP legacy site inside my public's
rails folder, so any user can acces the rails site using for example
I am trying to get hourly counts of orders between different price
ranges from my database. I'm thinking there has got to be a better way
than looping through each record and checking if the created_at time
fits between hour 1, 2, 3, 4, etc of the day and then returning the
count.
Currently I am
Gal Bar-or wrote:
Sorry in advance if this is on the wrong forum/topic.
I'm a novice ruby developer, starting to use ActiveRecord, and am
getting stuck with the following problem:
I have a class defined:
class User ActiveRecord::Base
set_table_name users
has_one :locations
fRAnKEnSTEin wrote:
Hi,
I have a rails site hosted in a mediatemple DV plan. I am not using
mongrels as web server, instead i am using passenger and it works
great.
Now what i want to do, is to host a PHP legacy site inside my public's
rails folder, so any user can acces the rails site
Michael Kahle wrote:
I am trying to get hourly counts of orders between different price
ranges from my database. I'm thinking there has got to be a better way
than looping through each record and checking if the created_at time
fits between hour 1, 2, 3, 4, etc of the day and then returning
Perfect, then...you've already got your vhost. If you really want URLs
of the formwww.misite.com/phpsite, then set up a redirect.
Hi,
ok, but that where i have to put that redirect sentence? i mean,
in .htaccess file inside public rails app, or inside php site folder,
or in my www.site.com
fRAnKEnSTEin wrote:
Perfect, then...you've already got your vhost. �If you really want URLs
of the formwww.misite.com/phpsite, then set up a redirect.
Hi,
ok, but that where i have to put that redirect sentence? i mean,
in .htaccess file inside public rails app, or inside php site folder,
Perfect, then...you've already got your vhost. If you really want URLs
of the form www.misite.com/phpsite, then set up a redirect.
Hi,
yes i need to use that URL form(www.misite.com/phpsite and
ww.misite.com), but where i have put that redirect sentence? i mean,
in .htaccess file inside my
Marnen Laibow-Koser wrote:
Michael Kahle wrote:
I am trying to get hourly counts of orders between different price
ranges from my database. I'm thinking there has got to be a better way
than looping through each record and checking if the created_at time
fits between hour 1, 2, 3, 4, etc of
Michael Kahle wrote:
[...]
Thanks for your reply. I use :conditions in my query to setup the
@order. I was just thinking that it would be worse to do a bunch of
lookups to the database for each dataset I am looking for when I could
just fetch all the records I need once and then loop
On Jan 27, 10:31 pm, John Merlino li...@ruby-forum.com wrote:
Students Model
named_scope :contactable, lambda { |current_user|
case
when current_user.contact.contactable_id = 1
current_user.contact.contactable_type = 'site' then
{ :conditions = {:site_id = 1}}
when
Hey thanks for the reply, http://github.com/rsl/stringex does look
very handy I'll keep it in mind in the future.
Just out of curiosity what did you mean by Might be an interesting
patch since you
should be able to determine what the underlying data type is and
then
cast it.
as in maybe I should
I am following video tutorials for rails.
I am a part where i am suppose to write scaffold :album inside
admin_controller.
class AdminController ApplicationController
scaffold :album
end
I did that but i get this errorundefined method `scaffold' for
AdminController:Class
What is going
On Wed, Jan 27, 2010 at 11:09 PM, Afg Afg li...@ruby-forum.com wrote:
I am following video tutorials for rails.
I am a part where i am suppose to write scaffold :album inside
admin_controller.
class AdminController ApplicationController
scaffold :album
end
I did that but i get this
Is the tutorial telling you to put that code in the AdminController? It
is my guess that the code is based on a plugin or gem. Have you
included all the proper plugins and gems?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the
I have a simple RESTful search scaffold that finds data in a separate
model and controller.
[code]
h1New search/h1
% form_for(@search) do |f| %
%= f.error_messages %
p
%= f.label :category_id %br /
%= f.collection_select :category_id, Category.all, :id, :name,
:include_blank = true
1 - 100 of 101 matches
Mail list logo