RailsCasts Pro episodes are now free!

Learn more or hide this

Art Mills's Profile

GitHub User: hail2skins

Site: www.hamcois.com

Comments by Art Mills

Avatar

I am pretty sure I had the same problem. In your _condition_fields.html.erb did you make sure to surround everything with:

<div class="fields">
</div>

It is triggering on that div I believe.

Avatar

My next polymorphic task is to add this exact function to a small app I have. I thought I was starting easier to just have an address field shared across models but there's not much out there to help with that, especially for Rails 4. I have put together how I got an address polymorphic association working in my app at my blog if anyone needs that help.

http://hamcois.com/articles/6

Avatar

Given the changes with Redcarpet, I was not able to get the steps in this Railscast to work. But, I used it to help me understand what I was looking at in figuring out what to do next. I got Redcarpet working with my Rails 4, RC1 blog. If you'd like steps, you can peek at it here:

http://www.hamcois.com/articles/4

Avatar

I have really gotten a ton out of Ryan's work. It's helped me immensely learning Rails and I still know nothing.

I put together a small instructional guide for those who want to use dataTables with Twitter Bootstrap. My environment is Rails 4, RC1.

Anyway, hope this helps. As it's long, I'll link it, but I can post it here if that's more appropriate.

http://www.hamcois.com/articles/3

Avatar

I was able to accomplish the same thing by having an @user = current_user for show, edit, update and destroy in the Users controller. However, your solution or mine, seems to remove the ideal of having all authorization located in one place given we have to adjust the Users controller to make things work there.

I'd guess the solution you came to with the do block in your member permission is the right direction. I'm going to play with that some.

Avatar

I was incorrect :). page_path("about") always points me to /pages/about and page_path["about"] only works if I'm on the /about page manually, then it shows correctly. Otherwise it doesn't show the path. Shows the root path for some reason. Having fun looking at it though to figure it out.

Avatar

Not sure if I did something wrong or if Rails 4 changed, but I ran through this episode using Rails 4 beta. The link in the view to point to page_path("about") worked fine if I wanted http://site/pages/about as my link but did not change to just http://site/about even after changing the route.

I wound up making that page_path["about"] and it seemed to work correctly. Just dropping this here if anyone else encounters it.