The first three requires bring in the files in vendor/assets/javascripts,
while the lastrequire_tree . tells sprockets to require everything in the
same directory. The require order is alphabetical, so you may have to move
things around or be more specific to correctly get your dependencies in
orde
In Rails 3.1
This is my application.css:
/*
*= require_self
*= require_tree .
*/
This is my application.js:
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require_tree .
What does the "require_tree ." do?
--
You received this message because you are subscribed to th
You may also want to read through Rails guides on testing -
http://guides.rubyonrails.org/testing.html#functional-tests-for-your-controllers
Chirag
http://sumeruonrails.com
On Tue, Jul 19, 2011 at 9:34 AM, Chirag Singhal wrote:
> Your test can be something like this:
>
> post :create, :user =>
Joshua Kappers writes:
>
> Essentially, I want to achieve something like this:
> http://pastie.org/private/0yuhxeqyheqov3pzkhnga
>
> Item model that can contain many Items that are required to create that
> Item.
>
> I'm new to rails, and having a hard time figuring out how to make this
> happ
Your test can be something like this:
post :create, :user => {:email => "test_em...@mail.com", :password =>
"12345", :name => "you"}
response.should redirect_to('confirm')
Chirag
http://sumeruonrails.com
On Mon, Jul 18, 2011 at 7:38 PM, Yennie wrote:
>
>
> On Jul 18, 9:57 am, Chirag Singha
Essentially, I want to achieve something like this:
http://pastie.org/private/0yuhxeqyheqov3pzkhnga
Item model that can contain many Items that are required to create that
Item.
I'm new to rails, and having a hard time figuring out how to make this
happen. Any guidance, is greatly appreciated.
-
Tyrel R. writes:
>
> Sorry its hard to phrase this question
>
> My user controller is a restful resource so get user shows the profile
> page that all users access. I was wondering where to code the control
> panel users see when the log in.
>
Which model(s) does the user's control panel pu
Barney writes:
>
>
> Skill
> <%= @people_skill.build.skill %>
> <%= PeopleSkill.where("people_id = @person.id")%>
>
>
> which produced the strange # guesses have either given me errors or no output at all, so please
> tell me the right way to do this.
> Barney
>
PeopleS
Sorry its hard to phrase this question
My user controller is a restful resource so get user shows the profile
page that all users access. I was wondering where to code the control
panel users see when the log in.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because
I have a table called people_skills linked to a people table by a FK
named people_id. Trying to get the people_skills fields printed on a
"Show" screen has never given me what I wanted (the field value)
without resorting to a helper which forms an input box. The people
table's values are printed
Isn't that just the `GET /users` path?
~ jf
--
John Feminella
Principal Consultant, BitsBuilder
LI: http://www.linkedin.com/in/johnxf
SO: http://stackoverflow.com/users/75170/
On Mon, Jul 18, 2011 at 21:12, Tyrel R. wrote:
> I just finished my authentication for my user model and session
> con
I just finished my authentication for my user model and session
controller and a question popped into my head. I do want to stay restful
and I don't know where to put my user control panel. I mean its not
really a show user thing. I could have a hole new controller and views
for the user control pa
Hi guys,
I'm using abingo to a/b test on my website. I have a buttong that I
would like to test with different words. Currently I have the test set
up like so:
<% ab_test("signup_test", ["START YOUR MEMBERSHIP","SIGN UP", "CLICK
HERE"]) do |button_text| %>
<%= button_to button_text, :new_user_re
Artful writes:
>
> I tried installing rubygems 1.8.5 and for the most part everything
> went as expected, but I received two Warnings and one Message:
>
> Fetching: builder-2.1.2.gem (100%)
> WARNING: builder-2.1.2 has an invalid nil value for @cert_chain
>
> Fetching: abstract-1.0.0.gem (100%
1 Thank you!it's help me. I guess that this is the problem.
Hassan Schroeder wrote in post #1011501:
> On Mon, Jul 18, 2011 at 3:04 PM, Aegorov Egorov
> wrote:
>
>> SQLite3::SQLException: near "to": syntax error: SELECT COUNT(*) FROM
>> "likes" WHERE ("likes".to = 1)
>> in sqlite console sql que
Hmm, I mean to integrate it a little differently, without using jQuery
safe mode.
Usually You also needs a lots of plugins that works with jQuery, and
some of them probably will not work in safe mode.
There should be no conflict and functional duplication, I suggested to
include only the 'lang.
On Mon, Jul 18, 2011 at 3:04 PM, Aegorov Egorov wrote:
> SQLite3::SQLException: near "to": syntax error: SELECT COUNT(*) FROM
> "likes" WHERE ("likes".to = 1)
> in sqlite console sql query working with this syntax
> SELECT COUNT(*) FROM "likes" WHERE ("likes"."to" = 1)
Apparently the SQLite3 ad
Hello!
I have a rails app using a mysql. Now I need to configure it with
sqlite.
I change database settings in config/database.yml and Gemfile file and
run
rake db:create
rake db:migrate
and did not get any errors.
But in view a have a code
<%=@user.likes.size%>
and get error
SQLite3::SQLExcept
On Mon, Jul 18, 2011 at 10:44 AM, Angelo Cordova wrote:
> I'm using paperclip for uploading images in the public folder, but
> when I want to show the images I have to use rmagick.
No you don't. The whole purpose of rmagick/ImageMagick in the
context of uploading is to enable resizing of too-lar
Colin Law wrote in post #1011094:
> On 15 July 2011 22:13, Jacob wrote:
>> of every required line. I'd like instead to use a variable:
>>
>> <% req = "Required field" %>
>>
>> And then have
>> <%= f.text_field :screen_name %> <%= req %>
>
> By default Rails will assume that req may contain malicio
On Jul 18, 9:09 am, cipher_neo wrote:
>
> I am not sure what gems are actually used in building the params hash or
> when using the "serialize" call, could you shed some light on that and maybe
> I can pin point what gem exactly is at the wrong version?
some combination of the rack and rails gems
On Jul 18, 7:29 pm, nisha wrote:
> Hi,
>
> My system has the following :
>
> MacOs Leopard
> Rails 3
> Ruby 1.9
> Mysql 5.1.58
> mysql2 ruby gems
>
> I have tried all the suggested methods, without any success.,
> The .bash_profile file is updated to contain the DYLIB in the path.
>
> The proble
hi,
How can i put gtalk into my application. Im using ruby on rails.
thanks,
patrick
--
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@googlegroups.com.
To unsubscribe from this group,
Hello everyone
I'm new in Ror and I have a problem with image display.
I'm using paperclip for uploading images in the public folder, but
when I want to show the images I have to use rmagick. Rmagick depends
on Imagemagick, and the owner of the project doesn want to install
Imagemagick. so I can'
Can you work from home ?
On Jul 17, 3:59 pm, Artur wrote:
> Hi,
>
> Please provide me with an additional information by
> artur.belya...@gmail.com
>
> On Jul 16, 1:05 am, Ale wrote:
>
>
>
>
>
>
>
> > HI all,
> > thanks for creating this chat!
>
> > I have a small internet start up and looking fo
It's generally not a good idea to use two large libraries like this in
the same page. Not only do they conflict (unless you use the
jQuery.noConflict() patch to rewrite any uses of the $ function
defined in Prototype) but they each do more or less the same thing, so
it's a waste to force a
Hi
I test "simple">
response.should render_template("home_simple")
How can i test the < render "home" >
response.should render_template("home")
it gives me error as : expecting <"home"> but rendering with <"">.
def home
if !current_user
render
Hi,
My system has the following :
MacOs Leopard
Rails 3
Ruby 1.9
Mysql 5.1.58
mysql2 ruby gems
My problem is that when i give "rails server", the task aborts with
the foll error
rails server/Users/nisha/.rvm/gems/ruby-1.9.2-p180@rails3/gems/
railties-3.0.5/lib/rails/script_rails_loader.rb:11: w
Hi,
I have a trouble of testing controller with redirect to the confirm
page
I dont understand why i can pass the render the template new but not
to
redirect the confirm
please help
in browser the link is
http://0.0.0.0:3000/register_confirm
def create
@user = User.new(params[:user])
I just used childs to show it was the plural. Would rails pluralize
child to children ?
All the attributes match correct in both cases - including parent_id -
but not parent. I assume the parent object is not a real attribute, as
only parent_id is shown when I do an inspect.
--
You received this
On Mon, Jul 18, 2011 at 10:47 PM, sreid wrote:
> My problem occurs when trying to modify a parent record from a child,
> using an after_create callback in the child is created (they have a
> has_many / belongs_to association).
>
> After some more testing (checking object ids), I can get a test to
Juan Alvarado wrote in post #1011279:
> I have a standard set of gems ( gems like rspec and factory_girl for
> example) which in most cases always get added to a project and I was
> wondering if anyone could point me in the right direction for an easy
> way to customize the rails new generator to i
My problem occurs when trying to modify a parent record from a child,
using an after_create callback in the child is created (they have a
has_many / belongs_to association).
After some more testing (checking object ids), I can get a test to
pass if I use (e.g.) :
1) Child.create(:parent => parent
On Jul 18, 9:57 am, Chirag Singhal wrote:
> You have to send params along with call to post.
> Since there are no params in post, it goes to the else section of you
> controller, where you render a action, and response code for render is 200.
> So the test fails saying that you expected a redire
Hi to all Please help me =(
I use rails_admin and I need to upload files with the help of it.
I found carrierwave for it and installed it with the help of
https://gist.github.com/884835. But It doesn't work =( when i login in
rails_admit? i see default text field instead field for choose a file
You have to send params along with call to post.
Since there are no params in post, it goes to the else section of you
controller, where you render a action, and response code for render is 200.
So the test fails saying that you expected a redirect but got render.
Chirag
http://sumeruonrails.com
Hi,
I want to test the user controller, how can i do
the code is
if @user.save
redirect_to :action => "confirm"
else
.
test
user = User.new(:email => "b...@mail.com",
:password => "12345",
:name => "you")
post :create
user.should_re
Hi,
I have stumbled upon a small issue regarding the use of Railties
(Engine) and setting the time_zone.
It seems when I set the time_zone in my engine like:
class Engine < Rails::Engine
config.time_zone = 'Brussels'
end
The actual time zone in the application is set back to the default 'U
On Mon, Jul 18, 2011 at 12:44 AM, cipher_neo wrote:
> I have done a quick search on footnotes, but still not quite sure what
> exactly it provides except for links back to the code?
> Are you saying it could be used alongside newrelic?
The information provided is similar, but no, there's probabl
On Jul 18, 2011, at 1:27 AM, 7stud -- wrote:
> Conrad Taylor wrote in post #1011293:
>> On Sat, Jul 16, 2011 at 4:34 AM, 7stud -- wrote:
>>
>>> versions back to the old versions, but now I get that spork error. Is
>>> there a way to 'unactivate' spork 0.9.0 and 'activate' spork 0.8.4?
>>>
>>>
I have been trying to eager load associations based on some scope in
my rails3 app, but could not find any solution.
My app has following models:
class Project
has_many :entries
has_many :to_dos
class ToDo
has_may :entries
has_many :tasks
belongs_to :project
I am sending multiparts emails ( html and plain text ) , I wrote as
default :
default :from => Rails.configuration.no_reply_address, :parts_order =>
["text/html", "text/enriched", "text/plain" ]
and each email is generated with the 2 formats :
mail(:to => @sender, :subject => "#{I18n.t(
Hi
I just released a gem called "Rails Exception handler" for Rails 3.
It gives you:
- An easy way of gathering error reports from all your rails 3 apps
in one database
- Customized responses that are rendered within the applications
layout file
- Fine grained control over which exceptions shou
On 18 July 2011 09:29, Colin Law wrote:
> On 18 July 2011 09:01, Jim Ruther Nill wrote:
>>
>>
>> On Mon, Jul 18, 2011 at 3:48 PM, sreid wrote:
>>>
>>> Is there some way to get a list of the existing instances which refer
>>> to the record ?
>>>
>>
>> I think there's none.
>>
>>>
>>> Would upgrad
On 18 July 2011 09:01, Jim Ruther Nill wrote:
>
>
> On Mon, Jul 18, 2011 at 3:48 PM, sreid wrote:
>>
>> Is there some way to get a list of the existing instances which refer
>> to the record ?
>>
>
> I think there's none.
>
>>
>> Would upgrading to 3.1 and enabling identity map solve the problem
Hi Fred, thanks for your feedback.
Yes, the data contained in the subhash (table_order_data) comes directly
from the params hash.
In which case I am not in control of how that hash is built.
This leads me to think that it has got something to do with how the params
hash is constructed, rather
On Mon, Jul 18, 2011 at 3:48 PM, sreid wrote:
> Is there some way to get a list of the existing instances which refer
> to the record ?
>
>
I think there's none.
> Would upgrading to 3.1 and enabling identity map solve the problem ?
>
>
Sorry, I haven't looked at 3.1 yet so I have no clue.
>
Is there some way to get a list of the existing instances which refer
to the record ?
Would upgrading to 3.1 and enabling identity map solve the problem ?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email
I have set up newrelic rpm and it is exactly what I was looking for.
Really in depth info about what is goin on in the code.
It has helped to me to find some places in the code that needed some
tweaking and has helped reduce average response times.
I have done a quick search on footnotes, but
On Mon, Jul 18, 2011 at 2:58 PM, Jim wrote:
> Thanks. I'm testing it out now.
>
> Unfortunately passenger/nginx 3.0.2 seems to be throwing exceptions
> and returning 502 if the file is large, over 100KB. Hopefully a new
> version will resolve that.
>
>
100kb isn't large. I don't know what the d
50 matches
Mail list logo