Displaying 20 results from an estimated 9000 matches similar to: "Store limited list in db?"
2008 Feb 11
6
Should I Test My Fixtures?
I have a number of fixtures in my test suite. For example, with
acts_as_authenticated and acts_as_state_machine, I created a number of
users in different account states for use in functional testing.
(Suspended users can not log in, etc)
Is it a good idea to run fixtures through tests to ensure that they
conform to their ideals?
EG: assert users(:suspended_user).suspended?
If so, where should
2008 Jan 23
1
acts_as_state_machine doesn't error on invalid state transition?
While using acts_as_state_machine, I noticed it doesn''t error when invalid
state transition is used. No false return, no exception. By invalid state
transition, I mean utilizing an event that does not define the current state
as a ''from'' state. Does anyone find this lacking? I would like to be able
to catch invalid state transition (such as attempting to fulfill a
2008 Jan 21
7
undefined method error
Hello everyone,
I am following the Practical Rails: Social Networking
sites book. In chapter 7 photo gallery I am getting a
NoMethodError in Pages#show
Showing layouts/_menu.rhtml where line #12 raised:
undefined method `new_entry_path'' for #<ActionView::Base:0x52fa56c>
Extracted source (around line #12):
9: <% if is_logged_in? %>
10:
2008 Jan 07
2
acts_as_state_machine override :initial state
Hello,
I''m not sure if this is where to post this, but i cannot find much
information/support for acts_as_state_machine.
I have a Friendship model which implements acts_as_state_machine. I
have an :initial state of :pending, but i would like to create a
Friendship model and save it directly with :accepted status.
I have tried Friendship.create(:state => "accepted") and
2008 Jan 08
7
script/server: Permission denied
when I run script/server I get this error:
script/server: Permission denied
I''ve been running this app for awhile now. Not sure what would have
caused the change.
Any ideas? I''ve messed around with permissions on the script folder but
nothing seems to work.
thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received
2007 Dec 22
3
Formatting looping display from mySQL table
Hi
I''m a noob to RoR. I have everything setup but can''t figure out to get
the list display as I would like. I''m sure this is very simple stuff. I
just haven''t figured it out yet :(
I hope someone can point me in the right direction :)
I have a mysql table "websites".
In it I have the following columns - Name, Url, Banner, Description
I created
2008 Feb 24
3
1 error(s) on assignment of multiparameter attributes
I am trying to create a form for processing credit cards. For the
credit card expiration date, I would like to leave the day field out
of the form for obvious reasons. However, the following code is
producing an error for me.
Any ideas?
Thanks!
<p><label for="email">Expiration</label><br/>
<input type="hidden" id="user_card_expiration_3i"
2008 Mar 28
10
Inheriting from AdminController intstead from ApplicationController
Hi
I would like to do the following:
I have created an admin namespace and the required folders app/admin
views/admin etc. And then I wanted all controllers under app/admin to
inherit from a controller named AdminController which resists under
app/admin/admin.rb instead of inhereting from ApplicationController,
so I could better separate between admin and public section. The
AdminController
2007 Dec 27
6
ActiveResource and (polymorphic) associations
Hi,
I''m just playing with ActiveResource and I did''nt find anything about
the support of (polymorphic) associations.
Is there a support at all?
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
2008 Jan 21
4
Caching CSS Issue
I have a problem I was hoping someone could shed some light on. I
noticed that with every request to my server, the css file was being
requested. I went ahead and made a static link to the css file so
there is no query string at all, but still I see the requests coming
in with each request. Do I need to do anything else (in the response
header maybe?) to make sure that browsers will cache the
2008 Jan 30
6
Rails 2.1
There''s been some great stuff added to edge since 2.0.2. Any chance it
might be wrapped up into a 2.1 release?
Cheers
Chris
--
----------------
http://pushrod.wordpress.com -- old dogs, new tricks
http://autopendium.com -- a place your old car can call home
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2008 Jan 15
2
rails rjs page object
Can anyone point me to api documentation for the page object that is
used in rails rjs files?
Thanks
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send
2008 Jan 21
13
has_many with different primary key
I''ve got quite the ActiveRecord challenge, any help would be
appreciated.
In my current project Companies can have many reviews.
class Company < ActiveRecord::Base
has_many :reviews, :as => :reviewable
end
However, my company table, I have two different IDs to identify my
company.
id - This is the typical id we use for normal stuff
other_company_id - This is the id we use
2008 Feb 28
2
random exception driving me crazy: SecurityError (Insecure: can't modify array)
Hi all, I''m running into a very strange but incredibly annoying
problem that I just can''t seem to solve.
The exception is occurring from a seemingly innocuous line in my code,
a simple ''logger.warn("some debug information")''. The backtrace
follows:
SecurityError (Insecure: can''t modify array)
2007 Dec 23
11
return day from date (javascript) ?
Ok, I know this isn''t a Rails problem, but if you could help me out
that''d be brill.
I''ve used JavaScript to create a new Date object containing a date of my
choice...
mydate = new Date("11/24/2007");
//going with Javascript''s mm/dd/yyyy format
now this is good, what i want to do now is put in an integer variable
the number for the day, in this case
2008 Jan 02
5
polymorphic assosciations - still the way in Rails 2.0.x
I store a lot of information concerning blogs, events, books, bla
bla...
So I have a lot of database tables including the same fields: url,
user_id, subject, comment.....
So I decided to use polymorphic assosciations.
Is this still the prefered way in 2.0.x or does Rails 2.0.x offers me
a easier, faster and more preferable way to do this?
By the way, isn''t it much easier to do all the
2007 Dec 10
10
Reading Hash/Array
Hi all,
My app is generating a form with several bill_items that should be
updated (fields to be updated are description and net).
The text_field_tag names are bill_item[update][#{id}][description] and
bill_item[update][#{id}][net] (and I added bill_item[update][#{id}]
[id] just in case)
The param received is:
{"commit"=>"Save",
2008 May 09
6
Operator Names.
What is this ''=>'' operator called?
Does it have a name?
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
2006 Jul 13
2
having a problem with acts_as_state_machine
Hi all:
Below is s a dump from script/console in development env.
Am I not supposed to be able to find the record later and use the
state machine functionality, or have I missed something? Thanks
Forrest
----------------------------
>> ts2 = TalkSession.create( :person_id => 2, :pattern_id => 2)
=> #<TalkSession:0x35811f0 @attributes={"pattern_id"=>2,
2007 Dec 13
10
Version naming to use in a RoR proyect
Hi everyone,
I would need to know if RoR follow any policy for version naming; I
mean, something like linux´s kernel does or similar.
For instance, kernel uses numbers separated in groups by dots (i.e.
pre 2.6 - AA.BB.CC). These groups mean differents fixtures, bugs
fixed...
I will start a big proyect from scratch with rails and I want to
choose now a standart to use and avoid future problems