Hey guys,
This seems pretty simple, but I cannot seem to find an answer online.
I have a user model and would like to use a user object in the js
file. Any ideas as to how I can do this?
Thanks and Regards.
--
You received this message because you are subscribed to the Google Groups "Ruby
on R
I tried this too, but when I put it in an .rb file, I get the error
above.
--
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
Using Devise on an application with basecamp like subdomains.
You can only register(sign_up) if the account(subdomain) you are
creating is unique.
You can only register(sign_up) from the root domain.
account_name is attr_accessor :account_name in user record and is
created when the user is creat
Hi,
I have a parent model like this:
class Parent < ActiveRecord::Base
belongs_to :grand_parent
has_many :blond_children, :dependent => :destroy
has_many :brunette_children, :dependent => :destroy
has_many :dogs, :dependent => :destroy
accepts_nested_attributes_for :blond_children, :br
I don't think the issue is specifically postfix. On a couple of different
servers, I have gotten Exchange to act as if it was a mail server by adding
an MX record for the Web server, set to such a low priority that it won't
ever see the light of incoming mail. In one other case, the Exchange admin
On Oct 27, 2010, at 2:48 PM, Gabi Ge wrote:
> Hello,
>
> Given:
>
> - a Dealer model and controller
> - index page with a search form on top and results shown below
>
> Problem:
>
> I'd like to select dealers based on keyword, status and program then
> order them by name/launched_at asc/desc.
Looks like I've gotten my app upgraded successfully, at least in the
browser. When I 'rake test' I get no love. I know I can start digging
through the Rails rake tasks, first want to see if anyone has an idea what
is going on:
DKMac:creditcompare3 DK$ rake test
(in /Users/DK/Documents/ror/projects
Greetings, dear, thanks for answering, my versions.
C:\>ruby -v
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
C:\>gem -v
1.3.7
C:\>rails -v
Rails 3.0.0
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" gro
Wich version of Ruby and Rails do u use now?
On Thu, Oct 28, 2010 at 12:15 AM, Blue Skull wrote:
> Greetings, I have an app running on RoR, this app is of ultra-basic
> style (http://www.hackerdude.com/courses/rails/PrimeraAplicacion.html),
> this app works as it in the example, but I can not ru
On Oct 27, 2010, at 6:10 PM, radhames brito wrote:
I have a public website accessible from the intranet and i have to
send mail to the inside and outside but the thing is when i try to
send mails with postfix apparently the exchange server wont accept
those so i cant send mails to the inside, n
Greetings, I have an app running on RoR, this app is of ultra-basic
style (http://www.hackerdude.com/courses/rails/PrimeraAplicacion.html),
this app works as it in the example, but I can not run the views, in the
folder \views, I have \layout and \Main, with their corresponding files
(.html.erb).
I have a public website accessible from the intranet and i have to
send mail to the inside and outside but the thing is when i try to
send mails with postfix apparently the exchange server wont accept
those so i cant send mails to the inside, now im trying to send with
the exchange server but i can
Hello,
Given:
- a Dealer model and controller
- index page with a search form on top and results shown below
Problem:
I'd like to select dealers based on keyword, status and program then
order them by name/launched_at asc/desc. The query joins in other tables
that are needed to perform the 'by
Just found: ftools is depricated and changed to fileutils.
On Oct 27, 4:28 pm, David Kahn wrote:
> If I run irb, and do this:
>
> require 'ftools'
>
> The response is:
>
> LoadError: no such file to load -- ftools
>
> I see around that 1.9.1 did not include ftools but no mention of 1.9.2.
> Looki
If I run irb, and do this:
require 'ftools'
The response is:
LoadError: no such file to load -- ftools
I see around that 1.9.1 did not include ftools but no mention of 1.9.2.
Looking at the Ruby docs (http://www.ruby-doc.org/stdlib/), ftools is still
there.
Any ideas? Thanks,
David
--
You r
Thank you guys so much for your help. I think I have everything
working now. It must be frustrating dealing with such simple issues.
Just one more question: Did you intend to put the " - " in <%=
form_tag('/') do -%> ? I removed it and it didn't seem to change
anything.
Thanks again for the hel
Try typing rake routes in your project folder (in Terminal). You
should see all the various routes explained for you. Depending on the
combination of modules you have enabled in Devise, this route users/
password/edit may mean something specific. See which controller and
which action it is h
This is the page
http://localhost:3000/users/password/edit
When I'm NOT logged in I can see it, but when IM LOGGED in it redirects
me. weird
--
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
I just found a page that is already built on Devise but it redirects me
to the root when I try to access it. Is there a reason for this? The
user that is trying to access that page has can :manage, :all
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are sub
When I put config.cache_classes = true in development.rb/
production.rb, index action is not cached in memcache stor, rather
local cache store is used. On putting config.cache_classes = false ,
action caching is working fine. In production we want
config.cache_classes = true, but then caching is no
I have a startup considering building a Java backend and a Rails
frontend. The Java backend will take care of creating a caching layer
for the database and offer other additional services. The Rails
frontend will mostly be for creating the webapp and monitoring tools.
What startups/companies out t
This is the second time I have seen this error, and been googling around and
cant find an explanation. This error is happening with Rails 3/1.9.2 and was
not with Rails 2.3.8/1.8.7:
*Template is missing
Missing partial layouts/application with {:handlers=>[:erb, :rjs, :builder,
:rhtml, :rxml], :f
I've been googling a lot about it and can't find the solution.
I have a form to edit a user, but I need to two fields to update or
change their password: New Password / Confirm Password fiels.
I know you can reset your password by clicking the Forgot My Password
link. But I want them to be able t
Sam Kong wrote in post #957571:
> Hi,
>
> I installed ruby 1.8.7 and passenger 3.0 for apache2 on Ubuntu 10.10.
> Rails 2.3 works fine.
> But Rails 3.0 gives an error saying that rack version is not 1.2.1.
> If I upgrade the rack to 1.2.1, then rails 2.3 app complains that the
> rack version is not
The files in /dev don't exist by default under cygwin. Instead cygwin
internally handles reading and writing to them specially. See
http://www.cygwin.com/cygwin-ug-net/using-specialnames.html for more
info. There is also a script to create the dev files.
--
Posted via http://www.ruby-forum.com/.
I solved this in an application by creating a separate "sort_name"
field that was strictly used for sorting. Never seen or used by the
user at all. We had a "before_save :build_sort_name" method that
handled all sorts of cases. Wouldn't be too hard to add something
similar for your scenario.
def b
Hi daze,
I’m trying the same without a solution yet. Did you make any progress?
Kind regards
Marc
--
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 rubyonrai
Switching our routes file from Rails2 to Rails3 DSl uncovered an odd
situation, of my own making, but I am having some difficultly imagining
how to fix it.
Basically I have a commonplace: user -> user_role (clearance) <- role
type arrangement where:
User
has_many :roles, :through => :clearance
hmmm... So you're using Rails 2.3 and 3.0 versions?
Luis Saffie
--
http://saffie.ca
--
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...@google
Hi,
I installed ruby 1.8.7 and passenger 3.0 for apache2 on Ubuntu 10.10.
Rails 2.3 works fine.
But Rails 3.0 gives an error saying that rack version is not 1.2.1.
If I upgrade the rack to 1.2.1, then rails 2.3 app complains that the
rack version is not ~>1.1.0.
How do I satisfy both rails 2.3 an
Satsou Sa wrote in post #957508:
> yong gu wrote in post #957495:
>> If you are using rails 3, see this
>> http://railscasts.com/episodes/219-active-model
>
> Thanks! But there is a problem with ActiveModel: I can not make
> associations such as belongs_to or has_many...
Why do you need them on a
E. Litwin wrote in post #957563:
> On Oct 27, 9:09am, Marnen Laibow-Koser wrote:
>> The easiest way would involve using a separate DB field, so that you can
>> do ORDER BY title, put_at_end.
>
> Wouldn't that have to be ORDER BY put_at_end, title? (assuming
> put_at_end has a value of 0 or 1)
Yes
On Oct 27, 9:09 am, Marnen Laibow-Koser wrote:
> The easiest way would involve using a separate DB field, so that you can
> do ORDER BY title, put_at_end.
Wouldn't that have to be ORDER BY put_at_end, title? (assuming
put_at_end has a value of 0 or 1)
--
You received this message because you ar
On Oct 27, 10:40 am, Marnen Laibow-Koser wrote:
> Rob Biedenharn wrote in post #957481:> On Oct 27, 2010, at 8:35 AM, Vitaliy
> Yanchuk wrote:
>
> >> How can I use proper word after number, depending on that number.
> >> For example I have message that says:
>
> >> for 23 monthes, or it can be 21
yeah that works better. :-)
How other gems are handling this.
It looks like acts_as_ferret is only supporting Rails3 in > 0.5 so no
need for version checks there (unfortunately it isn't quite rails 3
ready yet).
On Oct 27, 9:41 am, Tim Shaffer wrote:
> On Oct 27, 9:09 am, Tony Primerano wro
yong gu wrote in post #957495:
> If you are using rails 3, see this
> http://railscasts.com/episodes/219-active-model
Thanks! But there is a problem with ActiveModel: I can not make
associations such as belongs_to or has_many...
--
Posted via http://www.ruby-forum.com/.
--
You received this m
Rob Biedenharn wrote in post #957481:
> On Oct 27, 2010, at 8:35 AM, Vitaliy Yanchuk wrote:
>
>> How can I use proper word after number, depending on that number.
>> For example I have message that says:
>>
>> for 23 monthes, or it can be 21 month.
>> So I have to inflect depending on number
>>
>>
Hi,
I am wondering if there is a way of catching exceptions that are
thrown within rubyzip.rb.
For example:
in rubyzip line 583,
private
def set_time(binaryDosDate, binaryDosTime)
@time = Time.parse_binary_dos_format(binaryDosDate,
binaryDosTime)
rescue ArgumentError
puts "I
If you are using rails 3, see this
http://railscasts.com/episodes/219-active-model
On Wed, Oct 27, 2010 at 4:06 PM, Satsou Sa wrote:
> Hello,
>
> I would like to create a simple ActiveRecord model, but working without
> table... Is that possible? I think we can this a virtual model.
>
> And I wo
You could try http://facebooker.rubyforge.org/
On Wed, Oct 27, 2010 at 9:05 PM, jef wrote:
> Hi,
>
> What is the best library to develop a facebook app?
>
> Thanks
> JF
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to
On Oct 27, 9:09 am, Tony Primerano wrote:
> Seems like that would break something once Rails 4 comes out. ;-)
Couldn't you do this?
if Rails::VERSION::STRING.to_i >= 3
puts "at least rails 3"
else
puts "rails 2 or lower"
end
--
You received this message because you are subscribed to the G
On Oct 27, 2010, at 9:19 AM, Michael Pavling wrote:
On 27 October 2010 14:07, Rob Biedenharn
wrote:
If you're just in plain Ruby, it might depend on the pluralization
rule:
"#{n} month#{'s' unless n == 1}"
"#{n} part#{n == 1 ? 'y' : 'ies'}"
"#{n} fish"
You can also use String.plu
On 27 October 2010 14:23, Rose Rose wrote:
> i want to get a service from this site :
>
> http://ww2.tsetmc.com/webservice/TsePublic.asmx
>
> but this site return a empty object for this method
> => SOAP::Mapping::Object
Have you tested that the service works nicely with your request from a
mocki
i want to get a service from this site :
http://ww2.tsetmc.com/webservice/TsePublic.asmx
def index
soapdriver =
SOAP::WSDLDriverFactory.new(wsdlPath).create_rpc_driver
result = soapdriver.Board(:UserName => 'usernameValue',:Password
=> 'passwordValue')
end
but this site return a emp
On 27 October 2010 14:07, Rob Biedenharn wrote:
>
> If you're just in plain Ruby, it might depend on the pluralization rule:
>
> "#{n} month#{'s' unless n == 1}"
>
> "#{n} part#{n == 1 ? 'y' : 'ies'}"
>
> "#{n} fish"
>
You can also use String.pluralize
"#{n} {n == 1 ? 'month' : 'month'.plurali
I'm seeing a handful of gem bugs on rails3 that are going unresolved
because the fix breaks the gem on rails2.
What is the preferred way to add rails version conditions to a gem?
Is checking the Rails::VERSION::STRING what folks should be doing?
if Rails::VERSION::STRING.start_with?("3")
do rai
On Oct 27, 2010, at 8:35 AM, Vitaliy Yanchuk wrote:
How can I use proper word after number, depending on that number.
For example I have message that says:
for 23 monthes, or it can be 21 month.
So I have to inflect depending on number
--
If you're in a Rails view, you can say:
pluraliz
Hi,
What is the best library to develop a facebook app?
Thanks
JF
--
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
rub
How can I use proper word after number, depending on that number.
For example I have message that says:
for 23 monthes, or it can be 21 month.
So I have to inflect depending on number
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Googl
Michael Pavling wrote in post #957448:
> On 27 October 2010 11:43, Pale Horse wrote:
>
>> Which of the two methods below are the most stable? Does it matter?
>>
>> !...@articles.empty?
>> @articles.length > 0
>>
>> I personally prefer using the 'empty?' method.
>
> Between the two, I'd use ".empty
I use Mongrel as web service. Here is a link that might help:
http://noobonrails.blogspot.com/2006/06/how-to-setup-mongrel-as-native-windows.html
On Oct 26, 10:29 am, Daniel Shimoyama
wrote:
> Wassup everyone?
>
> I'm trying to deploy a application on windows server 2000, developed
> with JRuby.
i succeded in getting it working and posted a short how-to in this
thread
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/90bac21d2f5d2616/908fbcaed47c5259#908fbcaed47c5259
will probably go the CentOS PhuzionPassenger MySql route in the
future.
On 26 Okt, 18:56, Marnen Laibo
Can someone remind me of the incantation to use ActiveRecord in a
plain ruby program for the versions specified. I'm not having any luck
searching with google and I keep getting:
`require': no such file to load -- activerecord (LoadError)
Not sure if this is a dependency or file path problem.
T
On 27 October 2010 11:43, Pale Horse wrote:
> Which of the two methods below are the most stable? Does it matter?
>
> !...@articles.empty?
> @articles.length > 0
>
> I personally prefer using the 'empty?' method.
Between the two, I'd use ".empty?", but at a choice I'd use neither,
and go for ".bl
Which of the two methods below are the most stable? Does it matter?
!...@articles.empty?
@articles.length > 0
I personally prefer using the 'empty?' method.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails:
Anyone know an up-to-date gem for Rails 3 to connect and display
markers on google maps? It seems the gem YM4R hasn't been updated for
a while now... Most of the articles I find on Google are a bit
outdated as well.
Should I just stick with native Google Map API for this?
--
You received this me
tashfeen.ekram wrote in post #957373:
> I am upgrading to rails 3 and afer diong so, none of my form_for are
> working. (I can not actually say not all of them are working but the
> few that i have tried are not). The page loads fine but the form is
> not output. This is after making the the change
I finally got it working after a lot of googeling around big thanks
to
http://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/Platform-Installation---Windows
for pointing me towards ruby-odbc which was the final peice to solve
my puzzle
How to get Ruby on Rails working with MS SQL
Hello,
I would like to create a simple ActiveRecord model, but working without
table... Is that possible? I think we can this a virtual model.
And I would like to be able to use relations (like has_many :users, etc)
with this model (named App for instance), such as:
> App.first.users
Thanks f
I finally got it working after a lot of googeling around big thanks
to
http://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/Platform-Installation---Windows
for pointing me towards ruby-odbc which was the final peice to solve
my puzzle
How to get Ruby on Rails working with MS SQL
On 27 Oct 2010, at 07:23, CuriousNewbie wrote:
Hello, I'm working to have Rails 3 respond with a JSON request which
will then let the app output the search results with the jQuery
template plugin...
For the plugin to work, it needs this type of structure:
[
{ title: "The Red Violin", u
> What I'm trying to find out is specifically how IE 6 breaks (as in
> incorrectly renders the page) when using valid HTML 5 markup (including
> self-closing tags) with . Again assume no HTML 5 only
> features only markup syntax.
>
> I'm asking because I don't personally use any version of IE, much
> <%= form_for @user_session, :url => user_session_path do |f| %>
> Email
> <%= text_field_tag :login %>
> Password
> <%= f.password_field :password %>
> Remember Me
> <%= f.check_box :remember_me %>
> <%= f.submit "Login" %>
> <% end %>
replace <%= text_field_tag :login %> with
63 matches
Mail list logo